How to restart or shut down Windows or Windows Server from the command line

Practice



Open CMD (Start -> Run -> "CMD" -> OK) and enter:

to restart:
C:\> shutdown -r -t 3

or (for reliability):
C:\> shutdown -r -f -t 3

Here:
-r : Restart
-t 3 : Wait 3 seconds before starting the restart (default = 30 seconds)
-f : Force - if some programs or services don't want to close (they've hung) - then ignore them and restart anyway.


to shut down:
C:\> shutdown -p

or (for reliability):
C:\> shutdown -p -f

Here:
-p : Shut down
-f : Force - if some programs or services don't want to close (they've hung) - then ignore them and restart anyway.

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Operating Systems and System Programming"

Terms: Operating Systems and System Programming