What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Execute Program as Notification

Votes:

0

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?

execute-program notification powershell prtg

Created on Aug 23, 2018 10:39:48 AM



6 Replies

Votes:

0

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 :-)

Created on Aug 23, 2018 6:36:10 PM



Votes:

0

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.

Created on Aug 24, 2018 8:32:00 AM



Votes:

1

Hi there,

How you check and set the Execution Policy properly is described on the following site:
https://kb.paessler.com/en/topic/20443-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.

Created on Aug 24, 2018 10:37:34 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

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?

Created on Aug 24, 2018 4:21:47 PM



Votes:

0

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.

Created on Aug 27, 2018 9:14:19 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

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.

Created on Sep 11, 2018 8:39:08 AM

Last change on Sep 11, 2018 7:08:04 PM by  Dariusz Gorka [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.