Here is what I got trying to put together a script to read the patches on a remote PC:
$computer = gc env:computername $computers= get-content -path c:\computer.txt $csvfile = "c:\name.csv" foreach ($computer in $computers) {Get-WmiObject -Class WIN32_QuickFixEngineering | Select-Object "Caption","CSName","Description","InstalledBy","InstalledOn" |ConvertTo-HTML | Out-File $csvfile}
I do get the results, but I get them from the local machine and not the remote one. What am I doing wrong trying to get the computer name from the c:\computer.txt file?
Thanks again for the help.