i have script to find HOTFIX and its working fine .
i have all host name in Listofcomputer.txt
when i run this command its gives detail as .
i want one more colum name Generated for (host name ) because it shows only Generated from PC1 and its bit confusing when showing to third party .
(in short it showed show for which server hotfix report is generted )
Function Get-ComInfo {
param(
$computers
)
"#"*80
"Server HotFix Report"
"Generated $(get-date)"
"Generated from $(gc env:computername)"
"#"*80
Get-HotFix -ComputerName $computers
}
Get-Content C:\listofcomputer.txt | ForEach-Object { Get-ComInfo -computers $_} |
Out-File C:\HotFixReport.txt
################################################################################
Server HotFix Report
Generated 08/08/2013 12:55:44
Generated from PC1
################################################################################
Source Description HotFixID InstalledBy InstalledOn
======= =========== ======== =========== ============
a