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
check_ms_iis_application_pool powershell auth issue
-
jkelly1959
- Posts: 49
- Joined: Tue Jun 06, 2017 10:59 am
check_ms_iis_application_pool powershell auth issue
You do not have the required permissions to view the files attached to this post.
Re: check_ms_iis_application_pool powershell auth issue
Please change your last line to this:
Then restart the NSClient++ service and test again.
Thank you
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 -Thank you
-
jkelly1959
- Posts: 49
- Joined: Tue Jun 06, 2017 10:59 am
Re: check_ms_iis_application_pool powershell auth issue
Don't I feel silly....Than Worked!
Thank you
Thank you