I'm trying to execute a script block using powershell in the console, and I can't quite get the syntax working like I want. I need another set of eyes, because I've been staring at this for a long time. Can someone point out what I'm doing wrong?
C:\Users\Administrator.MAUL>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -NoProfile -Inputformat None -ExecutionPolicy Unrestricted -Command "& {'C:\Users\Administrator.MAUL\Scripts\InstallTransportAgent.ps1' -ExchangeDir 'C:\Program Files\Microsoft\Exchange Server\V14' -AgentDir 'C:\Users\Administrator.MAUL\Project\TransportAgent\bin\x64\Debug' }"
The result:
You must provide a value expression on the right-hand side of the '-' operator.
At line:1 char:126
+ & {'C:\Users\Administrator.MAUL\InstallTransportAgent.ps1' - <<<< ExchangeDir 'C:\Program Files\Microsoft\Exchange Server\V14' -AgentDir 'C:\Users\Administrator.MAUL\Project\TransportAgent\bin\x64\Debug' }
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordEx
ception
+ FullyQualifiedErrorId : ExpectedValueExpression