I want to execute a cmd on PowerShell and this command uses semicolons. Then PowerShell interprets it as multiple commands. How do I make PowerShell ignore the semicolons and ex
Just escape the semicolon on the command line:
msbuild /t:Build`;PipelinePreDeployCopyAllFilesToOneFolder /p:Configuration=Debug`;_PackageTempDir=$TargetFolder $WebProject
I do this all the time with the tf.exe utility:
tf.exe status . /r /workspace:WORK`;johndoe
FYI, this issue has been heavily voted up on Connect. PowerShell v3 addresses this issue with the new --%
operator:
$env:TargetFolder = $TargetFolder
msbuild $WebProject --% /t:Build;PipelinePreDeployCopyAllFilesToOneFolder /p:Configuration=Debug;_PackageTempDir=%TargetFolder%