Invoke-Command : A positional parameter cannot be found that accepts argument

前端 未结 1 1118
無奈伤痛
無奈伤痛 2021-01-25 01:51

I am getting the above problem with the below script in powershell. I can\'t seem to find the issue. The script requires 2 parameters, and I\'ve supplied them on the command lin

相关标签:
1条回答
  • 2021-01-25 02:28

    Try it with the -Command parameter e.g.:

    powershell.exe -ExecutionPolicy Bypass -Command {invoke-command -file installboot.ps1 -computername 192.168.162.1 -argumentlist MyServer\MyNewService,option2}
    
    0 讨论(0)
提交回复
热议问题