asked on
$HotfixID = "KB5005031"
$ComputerList = Get-Content "C:\Users\Desktop\machines.txt"
ForEach ($Computer in $ComputerList)
{
Get-HotFix -ComputerName $Computer |where {$_.HotFixID -Match $HotfixID}|select @{n="Computer";e={$Computer}},HotFixID,InstalledOn
}
How can I get this to skip a pc that doesn't respond so that the script doesn't get hung up and where can I output which computers have the KB?