Powershell脚本中的位置参数错误

Gop*_*opi 4 powershell positional-parameter

我试图通过PowerShell安装/更新EPO代理,但出现错误。我是PowerShell的新手,所以我看不到是什么原因造成的。

以下是我用于更新代理的脚本:

Start-Process -FilePath $scriptpath "\INAEPO01_Framepkg.exe" "/FORCEINSTALL" "/INSTALL=AGENT" -Wait
Run Code Online (Sandbox Code Playgroud)

错误:

找不到接受参数/ FORCEINSTALL的位置参数。

DAX*_*lic 5

这样尝试,即在参数之间添加逗号,以便它们形成数组

Start-Process -FilePath $scriptpath "\INAEPO01_Framepkg.exe","/FORCEINSTALL", "/INSTALL=AGENT" -Wait  
Run Code Online (Sandbox Code Playgroud)

或者更明确

Start-Process -FilePath $scriptpath -ArgumentList "\INAEPO01_Framepkg.exe", "/FORCEINSTALL", "/INSTALL=AGENT" -Wait
Run Code Online (Sandbox Code Playgroud)