How to Shut Down Your Windows 10 PC Using Command Prompt

Microsoft Windows 10 logo

Using the command prompt to shutdown your Windows 10 PC offers more options and flexibility than simply using the shutdown option in the Start menu or pressing the power button on your PC . Here’s how it’s done.

Shut down your PC using the command prompt

Start by pressing the Windows + R keys to open the Run window. From there, type “cmd” in the box and select the “OK” button.

Runtime window

This will open the command prompt. Here, type shutdown / s.

Type the stop command

After pressing Enter, a message appears informing you that Windows will shutdown in less than a minute. You can select the “Close” button if you wish, but this will not affect the shutdown process.

Logout message

That’s all we can say about it. Within a minute, your PC will shutdown. There is also a way to restart your PC using the command prompt if that is what you prefer.

RELATED: 34 Useful keyboard shortcuts for the Windows command prompt

Restart your PC using the command prompt

This process of restarting your PC is almost identical to shutting down your PC, except that you will use a slightly different command in the command prompt.

Open the Run window by pressing the Windows Key + R keys, type “cmd” in the box, then select the “OK” button to open the command prompt.

Once at the command prompt, type shutdown / r.

Press the Enter key to continue. Your PC will now begin the restart process within the next minute.

These are just two of the many different options for shutting down your Windows PC from the command prompt. For a complete list of available shutdown options, type shutdown /? at the command prompt, then press Enter. A full list of switches and their respective descriptions will be displayed.

For the convenience of our readers, we have provided the full list of shutdown commands and descriptions provided by Microsoft below.

RELATED: Why does restarting a computer solve so many problems?

List of switches and command prompt shutdown parameters

Switch and setting
The description
/?
Display help.
/I
Display the graphical user interface (GUI).
/ l
Sign out. This cannot be used with the / m or / d options.
/ s
Turn off the computer.
/ sg

Turn off the computer. The next time you start up, if the automatic restart connection is activated, connect automatically and lock the last interactive user.

Once connected, restart all registered applications.

/ r
Complete shutdown and restart of the computer.
/ g

Complete shutdown and restart of the computer. Once the system has restarted, if the automatic restart connection is activated, connect automatically and lock the last interactive user.

Once connected, restart all registered applications.

/a

Cancel a system shutdown.

This can only be used during the timeout period.

Combine with / fw to clear all pending firmware starts.

/ p

Turn off the local computer without delay or warning.

It can be used with the / d and / f options.

/ h

Hibernate the local computer.

It can be used with the / f option.

/hybrid

Shuts down the computer and prepares it for a Quick Start.

Must be used with the / s option.

/ fw
Combine with a stop option for the next boot to go to the firmware user interface.
/ e
Document the reason for the unexpected computer shutdown.
/ o

Access the Advanced Boot Options menu and restart the computer.

Must be used with the / r option.

/ m \ computer
Specify the target computer
/ t xxx

Set the timeout before shutdown to xxx seconds.

The valid range is 0-315360000 (10 years), with a default value of 30. If the expiration time is greater than 0, the / f parameter is implicit.

/ c “comment”

Comment on the reason for restarting or stopping.

A maximum of 512 characters is allowed.

/ F

Force quitting running applications without notifying users.

The / f parameter is implied when a value greater than 0 is specified for the / t parameter.

/re [p|u]xx: yy

Indicate the reason for restarting or stopping.

p indicates that restart or shutdown is planned.

u indicates that the reason is user defined.

xx is the main pattern number (positive integer less than 256).

yy is the number of minor patterns (positive integer less than 65536).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.