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
The script will first ask if you want All(a) or Recommended(r) updates.
It will then go away and search for the updates then ask if you want to install all, none or selective updates.
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))