Pending Windows Updates count?
Jeran Cadorette
Trying to find pending/available Windows update counter for Server 2012r2. None of the the Windows Update registry keys match the available count seen on the servers. We use corporate WSUS to pull patches but have to install manually. I'd like to scan for available patches and install via Deploy.
0
Comments
Pending updates are not registry values. They are "live data" from Windows Update Agent API.
The easiest way to get them is via PSWindowsUpdate module in PowerShell
Get-WUInstall -AutoSelectOnly -ListOnly.If you use corporate WSUS as the patch repo, is there any reason you are not using GPO for scheduled install ?
We have many mission critical servers so we patch individually to avoid unforeseen issues. Our schedule is also day to day so GPO schedule would not work.
@Wei is right about the PSWindowsUpdate module being your best option.
With the line Wei posted to check for pending updates, you could build some very simple logic to install updates based on the results, install only a specific update if it is listed, install on only specific machines if it is listed as pending, etc.
Then you could incorporate that script as a Tool or as a package in Deploy.