我试图在cmd.exe中调用Powershell脚本,脚本位于如下所示的位置:c:Data\foo - bar\_ location-1\ShellScript.ps1
当我调用此脚本时,我尝试在路径周围使用单引号和双引号,但没有运气.
PowerShell.exe -File "c:\Data\foo - bar\location-1\ShellScript.ps1" Arg1 Arg2
Run Code Online (Sandbox Code Playgroud)
根据我的阅读,我认为上述内容可行,但这不起作用,也没有单引号.
我很欣赏任何想法.
谢谢*编辑*我的示例路径上的Mistype.抱歉.