ODT Export
 

Monitoring available Windows Updates

This is a quick method to log available updates for windows hosts.

  • Create a VBScript to print number of available updates, in this example we save it to c:\zabbix\wu\getnumupdates.vbs

Set updateSession = CreateObject(“Microsoft.Update.Session”)
Set updateSearcher = updateSession.CreateupdateSearcher()
Set searchResult = updateSearcher.Search(””)
wscript.echo searchResult.Updates.Count

  • Add the following line to zabbix_agentd.conf: UserParameter=wua.getnumupdates,%systemroot%\system32\cscript.exe /nologo c:\zabbix\wu\getnumupdates.vbs
  • Done!

You can now use wua.getnumupdates[] to monitor available updates for your monitored windows hosts.

Discussion

Logicwrath, 2010/06/03 08:00

I had trouble getting this script to work. Try this:

Set updateSession = CreateObject(“Microsoft.Update.Session”) Set updateSearcher = updateSession.CreateupdateSearcher() Set searchResult = _ updateSearcher.Search(“IsInstalled=0 and Type='Software'”) WScript.Echo searchResult.Updates.Count

If you only want critical updates try changing this line: updateSearcher.Search(“IsAssigned=1 and IsHidden=0 and IsInstalled=0 and Type='Software'”)

 
howto/monitor/os/windows/wua-win32.txt · Last modified: 2009/08/24 15:21 by richlv
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki