Page 1 of 1

check_ms_iis_application_pool powershell auth issue

Posted: Thu Oct 18, 2018 7:30 am
by jkelly1959
Our standard powershell execution policy setting is Restricted

Setting the policy to unrestricted does NOT help.
Here is error that we get when unrestricted.

check failed.

At line:1 char:1

+ scripts/powershell/check_ms_iis_application_pool.ps1 -A Diamond; exit ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : SecurityError: (:) [], PSSecurityException

+ FullyQualifiedErrorId : UnauthorizedAccess




I have been able to get it to run setting the policy on the windows server to bypass. However we really dont want to do that on the windows server.

I have tried to add the switch -ExecutionPolicy to bypass in the wrappings of the nsclient ini file but not having luck there or sure I am doing it right. I will attach nsclient ini.

I have been able to get this plugin to work when I set the server execution policy to Bypass.

Any suggestions on how to get this to run?

Thanks
John

Re: check_ms_iis_application_pool powershell auth issue

Posted: Thu Oct 18, 2018 2:23 pm
by ssax
Please change your last line to this:

Code: Select all

check_ms_iis_application_pool=cmd /c echo scripts/powershell/check_ms_iis_application_pool.ps1 $ARG1$; exit $LastExitCode | powershell.exe /noprofile -ExecutionPolicy Bypass -command -
Then restart the NSClient++ service and test again.

Thank you

Re: check_ms_iis_application_pool powershell auth issue

Posted: Tue Oct 23, 2018 7:53 am
by jkelly1959
Don't I feel silly....Than Worked!

Thank you