Trouble with Powershell and running a complex commandline

Posted by Frank Rosario on Stack Overflow See other posts from Stack Overflow or by Frank Rosario
Published on 2010-04-27T00:41:51Z Indexed on 2010/04/27 0:43 UTC
Read the original article Hit count: 396

Filed under:

Hi,

I've been trying to run the following command line from a Powershell build script we have; but keep running into issues

& 'C:\Dev\Yadda\trunk\BuildScripts\U tilities\csmanage.exe' /create-deployme nt /name:yadddayaddyaddadev /label:yadddayaddyaddadev /package:https://yadddayaddyadda.blob.core.windows.net/mydeployments/20100426_202848_FamilyMoments.cspk g /config:C:\Dev\WalmartOne\trunk\yadddayaddyadda.CloudService\bin\Debug\ServiceCon figuration.cscfg /slot:Staging /hosted-service:yadddayaddyadda-dev"

Note: the space in "Utilities" is intentional; trying to snif out a bug involving spaces in the executable path. I assure you, the path does exist with the space in it on my machine.

What's the best way to call this command line from Powershell? I've tried Invoke-Expression, Diagnostic.Process::Start, &; each method coming up with some different type of error; usually that it could find the executable. Any constructive input is greatly appreciated.

Thanks.

© Stack Overflow or respective owner

Related posts about powershell