32-bit or 64-bit for plugins

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
DuncanClarke
Posts: 8
Joined: Tue Oct 22, 2019 6:08 am

32-bit or 64-bit for plugins

Post by DuncanClarke »

I wrote a plugin in Powershell to report the Network Category on our Windows servers. However, this script doesn't appear to run correctly on all servers. Some it works fine but most it reports as Critical because it failed to ruin, giving the error:
Get-NetConnectionProfile : Provider load failure
At C:\\Program Files (x86)\\Nagios\\NCPA\\plugins\\CheckNetworkCategory.ps1:5 char:11
+ Switch ($(Get-NetConnectionProfile).NetworkCategory)
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (MSFT_NetConnectionProfile:root/StandardCi...nnectionProfile) [Get-NetConn
ectionProfile], CimException
+ FullyQualifiedErrorId : HRESULT 0x80041013,Get-NetConnectionProfile

Network Category is NOT set to DomainAuthenticated
Doing a quick search, it appears this may be due to hte plugin running in a 32-bit shell rather than a 64-bit one. Any idea how I can get this to work?

https://stackoverflow.com/questions/281 ... -powershel
DuncanClarke
Posts: 8
Joined: Tue Oct 22, 2019 6:08 am

Re: 32-bit or 64-bit for plugins

Post by DuncanClarke »

I have also found this, which requires an update to the config file on every managed server followed by restarting the NCPA listener service.

If anyone has any better solutions, I'm all ears, as editing that file on every server and restarting is not ideal.

viewtopic.php?p=278036
Post Reply