Shutdown options in Windows 7 / 8 using the command prompt

Apart from shutting down Windows in the usual way, there is a way to shutdown Windows 8 or Windows 7 using the command prompt. In fact there are several switches available too.

Shutdown options using the command prompt

To see all the available shutdown options in Windows 7 | 8, type cmd in start search and hit Enter. In the cmd window, type type shutdown /? and hit Enter.

cmd shutdown

This will list you the switches and shutdown options available.

For example:

To shutdown your PC type : shutdown / s

To restart your PC type : shutdown / r

To logoff your PC type : shutdown / l

The list of shutdown options include:

No args        Display help. This is the same as typing /?.
/?              Display help. This is the same as not typing any options.
/i              Display the graphical user interface (GUI).  This must be the first option.
/l              Log off. This cannot be used with /m or /d options.
/s             Shutdown the computer.
/r             Full shutdown and restart the computer.
/g             Full shutdown and restart the computer. After the system is rebooted, restart any registered applications.
/a              Abort a system shutdown.  This can only be used during the time-out period.
/p             Turn off the local computer with no time-out or warning. Can be used with /d and /f options.
/h             Hibernate the local computer. Can be used with the /f option.
/hybrid    Performs a shutdown of the computer and prepares it for fast startup. Must be used with /s option.
/e              Document the reason for an unexpected shutdown of a computer.
/o             Go to the advanced boot options menu and restart the computer.
/t xxx      Set the time-out period before shutdown to xxx seconds. The valid range is 0-315360000 (10 years), with a default of 30.
/c             Comment on the reason for the restart or shutdown. Maximum of 512 characters allowed.
/f             Force running applications to close without forewarning users.
/d            Provide the reason for the restart or shutdown.

You can see the full details in the command prompt window.

Microsoft has introduced a new way in Windows 8 to start your computer, called as Fast Startup. Using this file during boot, gives a substantial time-advantage during startup. To reinitialize Windows 8, you have to force a full shutdown.  Windows 8 also offers new CMD switches for shutdown.exe, you may want to have a look at!

Posted by on , in Category Windows with Tags
Anand Khanse is the Admin of, a 10-year Microsoft MVP Awardee in Windows & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.