Page 3 of 3

Re: MS IIS Application Pool

Posted: Fri Jun 10, 2016 6:47 am
by jkinning
I tested out your new code but got an error.

Code: Select all

./check_nrpe -H eas3t -t 30 -c check_ms_iis_application_pool -a '-A EasServices'
At C:\Program
Files\NSClient++\scripts\powershell\check_ms_iis_application_pool.ps1:19
char:13
+ #Requires ▒?"Version 2.0
+             ~~~~~~~~~~~~
The string is missing the terminator: ".
At C:\Program
Files\NSClient++\scripts\powershell\check_ms_iis_application_pool.ps1:19
char:11
+ #Requires ▒?"Version 2.0
+           ~~~~~~~~~~~~~~
Cannot process the #requires statement because it is not in the correct format.
The #requires statement must be in one of the following formats:
 "#requires -shellid <shellID>"
 "#requires -version <major.minor>"
 "#requires -pssnapin <psSnapInName> [-version <major.minor>]"
 "#requires -modules <ModuleSpecification>"
 "#requires -runasadministrator"
    + CategoryInfo          : ParserError: (:) [], ParseException
    + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
Changed line to #Requires –Version 2.0 and no more errors. I downloaded the tar.gz version of the latest code.

Thanks for this and the quick modification to the code! I don't know what issues or the differences between OnDemand and AlwaysRunning but I did just change the startup type to fix the problem originally. I am using the latest code with OnDemand so I'll give it a couple days and if any issues I'll report them here. Otherwise, I'll post it is safe to close this one.

Re: MS IIS Application Pool

Posted: Fri Jun 10, 2016 9:09 am
by mcapra
Keep us posted for sure!

Re: MS IIS Application Pool

Posted: Fri Jun 10, 2016 9:37 am
by WillemDH
Weird, I'm using

Code: Select all

#Requires –Version 2.0
in alot of my scripts. Never had any issues with it. I just tested this latest verion and I'm not seeing that error.

Grtz

Re: MS IIS Application Pool

Posted: Fri Jun 10, 2016 2:14 pm
by rkennedy
I'll leave this open should anything else come up over the weekend!