PRTG will not execute powershell script from notification

Votes:

0

Your Vote:

Up

Down

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 by  pasouza (0) 1



3 Replies

Accepted Answer

Votes:

0

Your Vote:

Up

Down

Hello,

which article did you follow in the KB. This one: http://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] (19,480) 3 1

Last change on Feb 26, 2014 2:59:05 PM by  Torsten Lindner [Paessler Support] (19,480) 3 1



Votes:

0

Your Vote:

Up

Down

I actually used this one:

http://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 by  pasouza (0) 1



Votes:

0

Your Vote:

Up

Down

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 by  pasouza (0) 1



Please log in or register to enter your reply.


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.

PRTG
Network Monitor
Intuitive to Use.
Easy to manage.

150.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Visit
www.paessler.com

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

Top Tags


View all Tags