Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1


Remember Me


0 votes
Current Version
Last Release Date
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
Twitter Handle

Help Support Ethan Galstad's New Project:

Help Support Ethan

A Message From The Founder...

As the founder of Nagios, I'm asking for your help in a cause that's dear to my heart.

I'm launching a new project to help better the world by providing the information, ideas, and inspiration that I believe can improve the lives of people everywhere.

I know you're busy managing networks, but I would appreciate it if you would consider liking my Facebook page and showing your support for the content and messages I produce by sharing them with your friends and family.

You can learn more about my project by visiting Thank you for your time. I wish you all the best in your endeavors, whatever they may be.

- Ethan

Neat VBscript to check if windows machines require an update (and/or a subsequent reboot). Windows 7 and 10 and others maybe ;-)

Check for Updates

To check for updates, this script creates an update searcher of an Microsoft.Update.Session object and filters for updates, which are
  • assigned to the machine (IsAssigned=1)
  • are not hidden to the users (IsHidden=0)
  • are not yet installed (IsInstalled=0)
In case of matches, it outputs the number of uninstalled updates and list the details as performance data.

Check for Reboot

The check for required reboots is performed using an Microsoft.Update.SystemInfo object.


The installation of course depends on your infrastructure. For example, if your running your checks using the NSClient++, you may save the script as C:Program FilesNSClient++scriptscheck_win_updates.wsf and then add something like that to your C:Program FilesNSClient++nsclient.ini:
timeout = 90

[/settings/external scripts/wrappings]
wsf=cscript.exe //T:90 //NoLogo scripts%SCRIPT% %ARGS%

[/settings/external scripts/wrapped scripts]
check_updates = check_win_updates.wsf
The timeout of 90 seconds is primarily for Windows 7 systems, which actually need a lot of time to search through installed updates... Also make sure that your call of the nrpe tool at the monitoring server waits long enough for the answer! (.../check_nrpe3 [...] -t 90 [...]) To properly parse the details about pending updates, you may also need to add
[/settings/external scripts/scripts/default]
ignore perfdata = true
This line tells the NSClient++ to not interprete the update details as performance data, and instead just forwards the details.