≡ Menu

Reboot Windows computer from command line

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.

  1. Open cmd.exe with ‘Run as administrator’
  2. Run the command shutdown /r
shutdown /r

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.

shutdown /a

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

shutdown /i

Add reason to reboot command

shutdown /r /c "This is the reason for the reboot of the computer"

Related Posts:
Reboot a remote computer

11 comments… add one
  • Binay

    Is the abort command supposed to work if one has issued the reboot from GUI. I have tried this on my Windows 7 Ultimate, it does not seem to be working. it says ‘no shutdown was in progress’

    • admin

      Abort works only when you had issued the reboot/shutdown using the command. GUI actions are not aborted by /a option.

  • James

    I’ve just attempted all commands from Windows 7 Ultimate install disk (used as recovery disk) and I obviously have a fault with my disk trying to load the Windows installation volume, I’ve launched command prompt via shift F10 as the GUI was not responding or should I say it had a never ending hour glass, trying a force shut down resulted in ‘the function is unknown’ proceeded with some numerical digits inside of closed brackets?

  • Ramesh

    Shutdown /a is very handy when windows update tries to force reboot your computer. You can run this command and cancel the reboot if you don’t want the reboot to happen at that time.

  • Michael roy

    thanks

  • Srini

    Works for rebooting Windows 10 from cmd.

  • Frank

    Please my system keeps saying 1720 smart hard drive detects imminent failure please back up the content and run hdd self test. I tried doing that but it failed. Tried some command prompt my system cannot still boot properly. Am using a windows 10. How do i fix tis error since my system cannot boot properly.

  • Tee

    HELP! I can’t unhide my files, my start and cortena isn’t working, my windows 10 system is slow. I have tried a number of codes using cmd, nothing is working, It keeps saying access denied. :(

  • Edmund

    Please i am having a problem running any installation on my windows,cos when ever i click the setup,windows keeps telling there is restart pending.
    So please how can i stop all pending restart on my windows?
    Thanks,i really need your help it’s urgent.
    E.A.

  • Vipin Gupta

    How to reboot Computer many times using cmd?

Leave a Comment