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?
Article Comments
I actually used this one:
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.
Sep, 2011 - Permalink
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.
Sep, 2011 - Permalink
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
Sep, 2011 - Permalink