This works in Exchange 2010 SP2; probably similar for others. program to start: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe arguments: -command ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; C:\path\to\custom_script.ps1"