Positional Parameter error in powershell script

后端 未结 1 520
鱼传尺愫
鱼传尺愫 2020-12-03 23:50

I was trying to install/update EPO agent through PowerShell, but I am getting below error. I am new to PowerShell so I am not able to see what is causing this.

Bel

相关标签:
1条回答
  • 2020-12-04 00:15

    Try it like that, i.e. add commas between the arguments so that they form an array

    Start-Process -FilePath $scriptpath "\INAEPO01_Framepkg.exe","/FORCEINSTALL", "/INSTALL=AGENT" -Wait  
    

    or to be more explicit

    Start-Process -FilePath $scriptpath -ArgumentList "\INAEPO01_Framepkg.exe", "/FORCEINSTALL", "/INSTALL=AGENT" -Wait
    
    0 讨论(0)
提交回复
热议问题