Make PowerShell ignore semicolon

后端 未结 6 2449
清歌不尽
清歌不尽 2021-02-19 06:54

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

6条回答
  •  时光取名叫无心
    2021-02-19 07:09

    As an alternative to Start-Process, you can just call the command as you would similarly call it using cmd.exe using the call operator &:

    & msbuild /t:Build;PipelinePreDeployCopyAllFilesToOneFolder /p:Configuration=Debug;_PackageTempDir=$TargetFolder $WebProject
    

提交回复
热议问题