How to shut down or restart Windows from comand line (cmd)

This is how you can shut down or restart Windows from command line. Run CMD as Administrator and type:

//Restart Windows
shutdown /r /t 1

//Shut down Windows
shutdown /s /t 1
Knowledge keywords: