Windows Server and installing selective Windows Updates

As IT Admins we often face this screen which will allow us to install all available Windows Updates, great, if you want to install them ALL….NOW!

How about if we want to be more selective and say install the Defender AV definitions but leave the cumulative updates until later?

Well! There is a way via using a built in VB Script…..hurrah I hear you shout!

This one is really simple and allows you to select each update individually to install. In an elevated PowerShell windows run

C:\Windows\System32\cscript.exe C:\Windows\System32\en-US\WUA_SearchDownloadInstall.vbs

The script will first ask if you want All(a) or Recommended(r) updates.

2020 11 09 13 11 25 Remote Desktop Manager Free chs wsus .local

It will then go away and search for the updates then ask if you want to install all, none or selective updates.

2020 11 09 13 12 25 Remote Desktop Manager Free chs wsus .local

This makes it easy to go through selectively and install only the updates you want.

Once done round it off with a simple PowerShell one liner to schedule an out of hours reboot. In the example below the server will be scheduled for a reboot at 3AM the following day.

$StartDate=(GET-DATE); $EndDate=(Get-Date -Hour 3 -Minute 00 -Second 00).AddDays(+1); shutdown /r /t ([math]::ceiling((New-Timespan -Start $StartDate -End $EndDate).TotalSeconds))

If you found this article helpful, would you consider buying me a Coffee?