OneCompiler

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

5 years ago by

Run this command,

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