I solved this a while ago, but in a different way. I wasn't able to launch a PowerShell script directly from the alarm. If I put a file with a ps1 extension, it simply ignored it. I'm not sure it there is a problem with my install, or if I'm simply doing it wrong. I was able to create a batch file script, and pass the variable to a PowerShell script inside. Cumbersome, but I got it working. If you're having success launching PowerShell scripts directly from the alarm then that's awesome!
Yes I was able to get it to work it took a while but I did not want to go the batch file route some of the keys things were making sure in the path that the executable name to use was present should look something like this (powershell.exe c:\script.ps1) and I think I did self signed for the security in powershell since its running on the on command server. I also dropped the ps1 file on the root of C: and then my script goes to that location before it does anything.
I've tried what you have documented but I still cannot get the script to execute when I perform an alarm test. I've set the powershell execution policy to Unrestricte with no joy and also placed the script in the root of the c:\.
We are facing the same issue, the alarm triggers the script. If you look in DFM log you will see that the powershell script is executed, but nothing happens. If i run the command which is executed from the alarm via start -> run, then the ps script works. In task manager you can see powershell is exexuted and stopped, but no error is registered.
Sorry guys I know how frustrating this can be for some reason one of my issues was that before the script ran I needed to send powershell to the script dir....so what I did was in the first part of my script it sets the script run location in the same dir as myscript. I think it was a permission issue or something. Also need to ensure that when the script is excuted its done with the proper permission
i can't add the 'Run script as:' option, This is only an option on Unix platforms is the response i get. When i run the command exactly as i do with the Alarm notification script, then the script works. This is the command i use in 'Script': powershell.exe D:\Progs\Powershell\scripts\test.ps1