Server 2016 and Windows Updates

You may need to force Windows Server 2016 to rescan for windows updates. It has changed slightly in Server 2016. So here is how:

$list1 = (Get-ADComputer -Filter {OperatingSystem -Like "*server 2016*"} -properties operatingsystem).Name | where {$_ -match "PROD"} 
$list1 | foreach {
PsExec.exe -s -d "\\$($_)" c:\windows\system32\UsoClient.exe startscan
PsExec.exe -s -d "\\$($_)" wuauclt /reportnow
}
This entry was posted in IT, Uncategorized and tagged . Bookmark the permalink.

Leave a Reply