Page 1 of 1

Check-Updates.ps1 plugin issue on WIN 2012 servers

Posted: Thu Sep 05, 2019 11:29 am
by bsivavani
Hi,

We are trying to implement below Check-Updates.ps1 plugin with Nagios XI to view windows servers security updates status.

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

We are able to get output from WIN 2008 server, but getting exception while executing the plugin in WIN 2012 server.

Output from WIN 2008
PS C:\Program Files\NSClient++\scripts> C:\Program Files\NSClient++\scripts\Check-Updates.ps1
9 Days since last update. There are no updates to be done.
PS C:\Program Files\NSClient++\scripts>

Output from WIN 2012
Exception from HRESULT: 0x80072EE2
At C:\\Program Files\\NSClient++\\scripts\\Check-Updates.ps1:140 char:16

+ ... $Updates = $( New-Object -ComObject Microsoft.Update.Session ).Creat ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : OperationStopped: (:) [], COMException

+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException


Kindly advice ?

Re: Check-Updates.ps1 plugin issue on WIN 2012 servers

Posted: Thu Sep 05, 2019 11:41 am
by scottwilkerson
I quick Google of the error code led me to several pages like this
https://www.updatexp.com/0x80072ee2.html
0x80072ee2 error in Windows Update
This error may occur when access to the Windows Update site is blocked because one or more of the following conditions is true: # A firewall on your computer or local network is interfering with your connection to the Windows Update site.
Is Windows updates allowed and enabled on this machine? Can you check for updates from the GUI?