Powershell script will not run using the ' -command ' to start it from task manager
Posted on 2014-04-15
I have to setup a re occurring task that utilizes the Exchange management shell for 2010. I have set the Execution Policy to remote signed and the script is local ( C drive). I have tried to test the cmdlet by itself in Powershell but i receive the following error :
missing expression after unary operator '-'. At Line:1 Char:2
here is the whole cmlet :
-command “. ‘C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; c:\scripts\Update-Recipients.ps1"