$ '/usr/lib64/nagios/plugins/custom_checks/nrpe_nsclient/nrpe_nsclient.sh' '-H' 'supermega.giga.host.com' -p 5665 -c check_ms_iis_application_pool --args 'DefaultAppPool'
Get-WmiObject : Invalid namespace "root\WebAdministration"
At C:\Program Files\NSClient++\scripts\check_ms_iis_application_pool.ps1:320
char:40
+ ... ProcessId = Get-WmiObject -NameSpace 'root\WebAdministration' -class ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-WmiObject], Management
Exception
+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.C
ommands.GetWmiObjectCommand
OK: Application Pool Started but no process is assigned yet "DefaultAppPool" with 0 Applications. {CPU: 0%}{Memory: 0MB} |'pool_cpu'=0%;;;0;100 'pool_memory'=0MB;;;0 'app_count'=0
Resolution:
You may not have IIS Management Scripts and Tools installed on server(s). You can install it from Server Manager -> Web Server Role -> Role Services -> Management Tools -> IIS Management Scripts and Tools. Make sure you have checked option "IIS Management Scripts and Tools" option
https://stackoverflow.com/questions/41451689/invalid-namespace-root-webadministration-on-iis-7-0