Windows updates vbscript
Description
This script was been created to monitor Windows servers for available updates. The script uses only the Windows Update API. (https://docs.microsoft.com/en-us/windows/desktop/api/wuapi/nf-wuapi-iupdatesearcher-search).
The script checks the number of all available updates, and only the important types of updates separately (according to https://blogs.technet.microsoft.com/dubaisec/2016/01/28/windows-update-categories/).
Contains: zbx.winupdate.vbs, winupdateSearchCheck.vbs, Winupdates_vbs.xml (zabbix template), README.md, panel_example.jpg.
Compatibility
Tested on Windows Server 2008, 2012, 2016; zabbix 3.4.
Change log
2018.12.07 Repaired value transfer error (at some OS builds) from the function "CheckUpdatesQuantity" that caused the null value to be returned. (string 118 : "searchResult = Nothing" - deleted)
2018.12.11 Added parameter IsSendDataWhenErrors (True/False). If you do not want to send extra data to the zabbix-server in case of errors, put IsSendDataWhenErrors = False.
2020.02.27 Deleted parameter IsSendDataWhenErrors (invalid data is not sent at all). Script call method changed. Added sender and configuration files search if the arguments is invalid. Fixed data transfer if zabbix-agent auto-registration is use.
2020.03.02 Parsing IPv6 at zabbix configuration file
How to use
The script can be used in two ways:
1. Specify macroses {$ZSENDER} (full path to the zabbix_sender.exe) and {$ZPATH} (full path to the zabbix_agentd.win.conf) in the zabbix-node.
2. Do not specify macros. Then it will automatically search for files zabbix_sender.exe and zabbix_agentd.win.conf.
More detailed information is in the file README.md
Optional
All items are divided into 2 groups: "Winupdates vbs" and "Winupdates vbs panel". You can create a panel with a convenient display of the current status of available updates on the servers. To do this, you need to create a widget "Data overview" on the dashboard, in the application field specify "Winupdates vbs panel". See panel_example.jpg.
Listing Details
1 version, '2020-03-02 14:05' modified