Check-Updates.ps1 plugin issue on WIN 2012 servers
Posted: Thu Sep 05, 2019 11:29 am
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 ?
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 ?