I am trying to set up an alert action in SAM that triggers a PowerShell script. I'm using the Advanced Alert Manager tool to set this up. I have come up with this string to use for the action command, and in testing it appears to be executing as I want, with the correct parameter option, but it doesn't appear to be running at all.
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command "C:\scripts\SomeScript.ps1 '${NodeName}'"
What the script should do is select some records from a database table and write them out to a log file. I am using hard-coded SQL credentials in the script for now, and I can run this command directly and it will work. However, when ran through the testing function of the Alert Manager, I see the correct command printed out, it doesn't seem to run. I can't even get a simple echo "hello" >> somefile type command to work through this tool.
What am I missing? Any ideas?
I already use this Orion server to run many PowerShell script monitors and I've already set the RemoteSigned execution policy for scripts. The OS is Windows 2008 R2.