我正在尝试使用空格启动 powershell 进程,请参见以下示例:
在职的:
$path = "C:\Windows\System32\notepad.exe"
Start-Process -FilePath powershell.exe -ArgumentList "& $path"
不工作(带空格):
$path = "C:\Program Files (x86)\CustomApp\Server.exe"
Start-Process -FilePath powershell.exe -ArgumentList "& $path; Read-Host"
使用Read-Host控制台退出前显示错误消息:术语“x86”未被识别为 cmdlet、函数、脚本文件或可运行程序的名称。
我该如何处理空间Start-Process?