You can shutdown your Windows machine from the command prompt – and also delay the shutdown time for say, 5 minutes, from when you execute the command.
I’d say this feature has two main uses:
You can also cancel Windows from shutting down when triggered from the command prompt, which you’ll see how to do below – so please feel free to try these as you go along, and just cancel them at any time.
Firstly, open your windows command terminal. Keyboard shortcut: Windows button + R. Then type in cmd, and press Enter:
Bringing us here:
Now, to do the standard shutdown, which will perform the shutdown in 60 seconds, we type shutdown -s:
Press Enter, and you'll be notified of the automatic shutdown in 60 seconds! The alert notification will appear:
Don't worry, you can cancel your computer from shutting down, by typing shutdown /a into the command prompt:
You will be notified of the cancellation. With something like the following:
You can also cancel the shutdown in the start menu, by again typing shutdown /a. Like so:
You can add another option to the shutdown call inside of command prompt to provide a time delay before shutting down the computer. To do so, you need to type shutdown -s -t 120. That will tell Windows to wait 120 seconds before shutting down:
You'll receive a similar looking notice as below:
I will of course cancel this command with shutdown /a afterwards!
And finally, here's a technique to add a custom message to the notification box. Maybe "HAHAHA LMAO!!1!" if it's a prank on your unlucky friend!?
For the above example, you would type shutdown -s -t 60 -c "HAHAHA LMAO!!1!". Like so:
And after pressing enter, you'll get an evil notice message:
With great power, comes great responsibility. Remember to save your work and enjoy the power of shutting down Windows directly from the command prompt.