This post explains how to shutdown windows 10 computer from command line. You will also learn how to cancel a shutdown issued from either from CMD or from GUI.
Do the following to shutdown from CMD.
- Open command prompt(Open run, type in ‘cmd’ and press enter).
- Execute the below command
- This displays a message in blue background which says “You’re about to be signed out. Windows will shutdown in less than a minute”
- The computer would go for shutdown in 60 seconds. This is a force shutdown, so any open applications would automatically be closed.
One nice thing about this command is that we can even cancel the shutdown if we change mind after issuing the command.This can be done with the below command.
After running this command you would see a message like “Logoff is cancelled. The scheduled shutdown has been cancelled.”
You can abort the shutdown at any point during the countdown(default is 60 seconds. You can specify custom timeout using /t). Note that cancelling can be done only from command prompt, this is not supported in GUI. Also, we can cancel shutdowns issued from GUI too.
Schedule shutdown one hour later
Using /t option, we can even schedule the shutdown at desired time. Do you want to shutdown 1 hour later? You can do this. Just run the below command
shutdown /s /t 3600
Example – Below you can see the command executed to shutdown 1 hour later and Windows displays message at the right bottom corner confirming the time of the shutdown to be 1 hour exactly from current time.