This is for Windows Server 2008 R2 and Exchange 2010.
- Action Tab
- New Action > Start a Program
- Program/Script: PowerShell.exe
- Add Arguments
-PSConsoleFile "C:\Program Files\Microsoft\Exchange Server\V14\Bin\ExShell.psc1" -Command "<Path to Script>"
Optionally, you may need to add the “Start In” path for PowerShell.exe
C:\Windows\System32\WindowsPowerShell\v1.0