Hello

I face a problem with Execute Program as Notification method in my environment.I want to Shutdown a windows server remotely when a sensor went into Down state. I write a simple powershell as below. Stop-computer -Computername 192.168.1.x I changed execution policy into unrestricted.then I copied it to Notification--->exe Folder. My Core and Probe is the same server.when I run it manually it works. When I test it I see Status sending EXE:OK in Log,but it doesn't work. Please let me know what should I do?


Article Comments

Did you activate remote execution on the target host?

You could use a simple DOS command - SHUTDOWN for this as well... avoiding the POWERSHELL - open a CMD prompt and type SHUTDOWN /? for details.

Further might the execution policy still be enabled for the PRTG service account - what would as well interfere here. Are you sure it is disabled there as well?

And finally it might have to do with a x64 and x32 PowerShell command - this can possibly cause issues. Some commands are sensitive to the architecture and PRTG I think runs in x64 - if I am not mistaken. There are ways to bypass this but I still would try to good old SHUTDOWN command to keep it simple.

Regards

Florian Rossmark

www.it-admins.com

PS: Seems pretty extreme shutting down a system :-)


Aug, 2018 - Permalink

Thank you Florian for your quick reply yes I activate remote execution on my target host.(Both Powershell 32 and 64 Bit)

sorry I don't know where can I check execution policy status for the PRTG service account that you mentioned above.please let me know where can I check it.

I checked opening simple batch file such as open a calc program.It didn't work,too.


Aug, 2018 - Permalink

Hi there,

How you check and set the Execution Policy properly is described on the following site:
https://helpdesk.paessler.com/en/support/solutions/articles/76000063331-powershell-32-bit-or-64-bit-and-execution-policy

Does the Notification work afterwards? If not, please include some debugging into the PowerShell Script, for example a line which writes "Test" to a file on the Core Server.

Best regards.


Aug, 2018 - Permalink

I set Execution Policy as your mentioned help.Now after Notification test I face "A required privilege is not held by the client(0X522) Error.I search this error and applied all recommendation such as https://www.thewindowsclub.com/required-privilege-not-held-client ,but still it doesn't work.any idea?


Aug, 2018 - Permalink

Hi Sara,

Did you entered any credentials that are used to execute the notification? If so, is the entered user an Administrator on the PRTG Core Server?

Best regards.


Aug, 2018 - Permalink

Not sure but this guide https://validedge.com/required-privilege-not-held-client/ (This site is not officially supported by the Paessler AG) from ValidEdge might help you out in someway. Just give it a try & post back if the issue is not resolved. We will try to find more working solution for the same.


Sep, 2018 - Permalink