Learn how to reboot a Windows computer from command line using the windows
shutdown command. We also have WMIC command that can reboot Windows from CMD.
Execute the following steps to reboot Windows.
- Open cmd.exe with ‘Run as administrator’
- Run the command
The reboot command works on all Windows versions – Windows 7, Windows 10 and Server 2012 and 2016.
This command sets time out of 30 seconds to close the applications. After 30 seconds, windows reboot will start. If you want to reboot Windows with your own time out value you can use the below command.
shutdown /r /t timeout_in_seconds
Reboot windows using WMIC
You can run the below wmic command to reboot Windows OS.
wmic os where Primary='TRUE' reboot
How to abort computer reboot
If you have issued a reboot command and have changed mind, you can stop Windows reboot by running the below command.
When you run this, you would see a pop up window at the right bottom part of the screen(near system tray) that shows the message “The scheduled shutdown has been cancelled”.
To force reboot by closing applications without warning
shutdown /r /f
Open the shutdown GUI
Add reason to reboot command
shutdown /r /c "This is the reason for the reboot of the computer"
Reboot a remote computer