Powershell docker image, Restart-Computer cmd missing 'ComputerName' parameter

  • Thread starter Thread starter freand0203
  • Start date Start date
F

freand0203

Guest
Trying to remotely restart a windows computer with powershell and Restart-Computer command. Powershell is running from a docker container with mcr.microsoft.com/powershell image, and from within the docker container i am running a powerhell script. The script is also tested on a windows 11 machine with powershell and it works as expected.Output from the script running from powershell in docker, PowerShell 7.4.2.PS /> /root/scripts/restart.ps1Restart-Computer: /root/scripts/restart.ps1:9Line | 9 | Restart-Computer -ComputerName&n

Continue reading...
 
Back
Top