Check-Updates.ps1 plugin issue on WIN 2012 servers

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Check-Updates.ps1 plugin issue on WIN 2012 servers

Post 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 ?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked