以下命令在 PowerShell 控制台中成功运行,但不在 cmd 提示符下。我不知道如何翻译它。
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -NoProfile -NonInteractive -Command '&{C:\Foo\MyScript.ps1 -InputPath ''C:\Foo'' -OutputPath ''C:\Foo\output'' -XmlPath ''C:\Foo\input\FrontDoor.xml'' -AssemblyPaths ''C:\Foo\input\file1.dll'',''C:\Foo\input\file2.dll'',''C:\Foo\input\file3.dll'' -Version 3 -Format json}; EXIT $LASTEXITCODE'
在 cmd 提示符下运行时,出现以下错误。
The string is missing the terminator: '.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
我尝试了很多方法来让它工作,但没有成功。
@PetSerAl,我不想相信。你的评论就是答案。谢谢你。
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -NoProfile -NonInteractive -Command "&{C:\Foo\MyScript.ps1 -InputPath 'C:\Foo' -OutputPath 'C:\Foo\output' -XmlPath 'C:\Foo\input\FrontDoor.xml' -AssemblyPaths 'C:\Foo\input\file1.dll','C:\Foo\input\file2.dll','C:\Foo\input\file3.dll' -Version 3 -Format json}; EXIT $LASTEXITCODE"
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句