For Microsoft Server OS's, is there a location in the registry or possibly WMI that stores the number of pending Important Updates?

My inventory software supports wmi and registry keys. Trying to see if there is a way to report that number so that I know remotely if there are updates either ready to be downloaded/installed. Searching for this gives a lot of out of scope information since ther are generic terms.

While I do use WSUS this information would be preferential to have centralized in my LanSweeper inventory system. Neglected to mention that I use WSUS yes. For WSUS to have this information I would gather that is it locally on my machine as well.


Solution 1:

I am not sure if it is possible to find the number of pending important updates. But in HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\UAS there is a Key called UpdateCount that will give you the total number of pending updates.

Solution 2:

There are 4 registry keys that will let you know if there are pending updates. HopelessN00b was on the right track, though you have to go up one level to see the keys.

HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update

The keys you want are:

  • UpdatesAvailableForDownloadLogon - Updates pending download(important updates)
  • UpdatesAvailableForInstallLogon - Downloaded updates pending install
  • UpdatesAvailableWithUiLogon - Pending updates that need interaction to install
  • UpdatesAvailableWithUiOrEulaLogon - Similar to above but you also have to accept a EULA

This should do the trick for your inventory software. Another one I tweak remotely is; NextDetectionTime This way if it is not going to check WU for a while or a security patch is out that I want to grab, I edit the date to today and the current time +1 minute.