PowerShell でコマンドを実行したいのですが、このコマンドではセミコロンが使用されています。その後、PowerShell はそれを複数のコマンドとして解釈します。PowerShell でセミコロンを無視し、独自のコマンドとしてコマンドを実行するにはどうすればよいですか?
例:
Invoke-Expression "msbuild /t:Build;PipelinePreDeployCopyAllFilesToOneFolder /p:Configuration=Debug;_PackageTempDir=$TargetFolder $WebProject"
もう一つの例:
Invoke-Expression "test`;test2"
2 番目の応答例:
The term 'test' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:6
+ teste <<<< ;teste2
+ CategoryInfo : ObjectNotFound: (teste:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
The term 'test2' is not recognized as the name of a cmdlet, function, script file, or operable program. Chec
k the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:13
+ teste;teste2 <<<<
+ CategoryInfo : ObjectNotFound: (teste2:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException