How to restart a computer using powershell?


I have windows running on ec2 instance, I want to turn off the system using Powershell. How can I do that?

1 Answer

4 years ago by

Run this command,

Restart-Computer -ComputerName "Server01" -Wait -For PowerShell -Timeout 600 -Delay 2
4 years ago by Divya