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

PRTG will not execute powershell script from notification

Votes:

0

When attempting to execute a powershell script from a notification nothing happens. Have been over every article within the Knowledge Base and nothing seems to help.

Cut and pasted sample script found within "How can I use PowerShell scripts with PRTG's 'Execute Program' notification?", placed script in EXE folder, added parameter to pass path to file in notification, configured notification to execute the script, but nothing ever happens. The script works fine when run from within a powershell context and passing the filename as an argument to the script. Should note that same notification is also configured to send an email which works everytime.

What could I possibly be overlooking in using the "Execute program" option?

execute-program powershell ps1

Created on Sep 8, 2011 12:40:11 PM



3 Replies

Accepted Answer

Votes:

0

Hello,

which article did you follow in the KB. This one: https://kb.paessler.com/knowledgebase/en/topic/2543-how-can-i-execute-a-batch-file-as-notification
For Powershell notifications, bear in mind, it depends on which version (32bit or 64bit) of the PRTG Core Service is running, if either the 32bit or the 64bit Powershell are used.

best regards

Created on Sep 8, 2011 2:10:18 PM by  Torsten Lindner [Paessler Support]

Last change on Feb 26, 2014 2:59:05 PM by  Torsten Lindner [Paessler Support]



Votes:

0

I actually used this one:

https://kb.paessler.com/knowledgebase/en/topic/18963-how-can-i-use-powershell-scripts-with-prtg-s-execute-program-notification

I hadn't read the article you listed. What I gather from this is that the powershell environment launched by the notification will run under the security context of the PRTG Core Server which in the case of a default account is the local system. I will modify this to use a domain account that has local admin rights and see what I get after a service restart.

Created on Sep 8, 2011 3:54:20 PM



Votes:

0

All it took was pointing me in the right direction of what was going on. Also found I had to modify various powershell environments I have on the system to find the right one to set the execution policy.

It now works.

Created on Sep 8, 2011 4:11:00 PM




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.