# questo sembra funzionare ### Set objSysInfo = CreateObject("Microsoft.Update.SystemInfo") Wscript.Echo "Reboot required? " & objSysInfo.RebootRequired ### save as CheckReboot.vbs perĂ² esce msg box , bisogna capire come salvare output in file e far controllare quello a zabbix ##################### https://www.zabbix.com/forum/zabbix-help/19393-how-can-i-monitor-when-win-after-update-need-to-reboot ### 'CheckReboot.vbs - checks registry keys to determine if machine needs to reboot. ' Returns 1 if reboot is required, 0 if not Function ReadRegistry (RegPath) Set oReg = CreateObject ("Wscript.shell") ReadRegistry = oReg.RegRead (RegPath) End Function iReturn = 0 On Error Resume Next iReturn = iReturn + CInt (ReadRegistry ("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired")) iReturn = iReturn + CInt (ReadRegistry ("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations")) WScript.Echo iReturn ### save as need_reboot.vbs ---------------------------------------- https://www.zabbix.com/forum/zabbix-help/38433-running-vb-scripts-windows-agent Steps Taken: 1: Created vbs script on Windows 8 Machine with the following contents: Set updateSession = CreateObject("Microsoft.Update.Session") Set updateSearcher = updateSession.CreateupdateSearcher() Set searchResult = updateSearcher.Search("") wscript.echo searchResult.Updates.Count 2: I can run the vbs script and it returns 4. 3: Added the following line to zabbix_agentd.conf: UserParameter=wua.getnumupdates,%systemroot%\syste m32\cscript.exe /nologo d:\Program Files\Zabbix Agent\getnumupdates.vbs 4: Created Discovery Rule: Name: Windows Updates Type: Zabbix agent Key: (Tried 2 different Keys) : Key 1: wua.getnumupdates[] Key 1 Result : Error Not Supported by Zabbix Agent Key 2: wua.getnumupdates Key 2: Result : Value should be a json object