Check for hotfix on multiple computers
Create file c:server_list.txt with a list of the servers to check.
In powershell scripts below: Replace $Patch variable KB2982791with the hotfix your looking for.
2 Files will be created on your desktop.
Hotfix=Present.log
Missing=Hotfix.log
Run the following from powershell
$computers = cat C:server_list.txt
$Patch = “KB2982791”
foreach ($computer in $computers)
{
if (get-hotfix -id $Patch -ComputerName $computer -ErrorAction 0)
{
Add-content “Hotfix is Present in $computer” -path “$env:USERPROFILEDesktopHotfix-Present.log”
}
Else
{
Add-content “Hotfix is not Present in $computer” -path “$env:USERPROFILEDesktopMissing-Hotfix.log”
}
}