How to Turn Off Your Windows 10 Computer Using Command Prompt

The Command Prompt offers extra choices for turning off your Windows computer instead of just using the restart button.

Windows 10

Using Command Prompt to turn off your Windows 10 computer offers more choices and control than just using the shutdown option in the Start menu or pressing the power button on your PC. Here's how you can do it.

Turn Off Your PC Using the Command Prompt

To get started, press the Windows and R keys together. This will open a window called Run. In this window, type "cmd" and then click on the "OK" button.

Turn Off Your PC Using the Command Prompt

This will open a program called Command Prompt. Here, type "shutdown /s" and hit Enter.

Turn Off Your PC Using the Command Prompt

You'll see a message telling you that Windows will shut down in less than a minute. You can click the "Close" button if you want, but it won't stop the shutdown.

Turn Off Your PC Using the Command Prompt

That's it! Your computer will shut down within a minute. If you'd rather restart your PC using the Command Prompt, there's a way to do that too.

Restart Your PC Using the Command Prompt

Restarting your PC is almost the same as turning it off, but you'll use a different command in the Command Prompt.

To start, press the Windows Key + R keys to open the Run window. Then, type "cmd" in the box and click the "OK" button to open the Command Prompt.

Now, in the Command Prompt, just type the restart command:

shutdown /r

Press the Enter key now. Your computer will start restarting in about a minute.

Restart Your PC Using the Command Prompt

How to Set a Time for Your Computer to Turn Off or Restart Using a Command in CMD

If you want to set a timer for either restarting or shutting down your computer, just add something extra to the previous instructions we gave you. To be exact, add /t TIME at the end of the command, and replace TIME with the number of seconds you want to wait. For example, if you want your computer to restart in 10 minutes, follow these steps:

shutdown /r /t 600

If you want to wait for 5 minutes, you can enter 300 seconds, and it works the same way for the complete shutdown command as well.

These are just a few of the different choices for turning off your Windows PC using the Command Prompt. To see all the shutdown options you can use, type shutdown /? in the Command Prompt and hit Enter. You'll see a complete list of options and what they do.

Restart Your PC Using the Command Prompt

To make things easier for you, we've listed all the shutdown commands and their explanations from Microsoft below.

List of Command Prompt Shutdown Switches and Parameters

Switch and Parameter Description
/? Display help.
/i Display the graphical user interface (GUI).
/l Log off. This cannot be used with /m or /d options.
/s Shutdown the computer.
/r Full shutdown and restart the computer.
/sg Shutdown the computer. On the next boot, if Automatic Restart Sign-On is enabled, automatically sign in and lock the last interactive user. After sign in, restart any registered applications.
/g Full shutdown and restart the computer. After the system is rebooted, if Automatic Restart Sign-On is enabled, automatically sign in and lock the last interactive user. After sign in, restart any registered applications.
/a Abort a system shutdown. This can only be used during the time-out period. Combine with /fw to clear any pending boots to the firmware.
/p Turn off the local computer with no time-out or warning. It can be used with /d and /f options.
/h Hibernate the local computer. It can be used with the /f option.
/hybrid Performs a shutdown of the computer and prepares it for a fast startup. Must be used with /s option.
/fw Combine with a shutdown option to cause the next boot to go to the firmware user interface.
/e Document the reason for an unexpected shutdown of a computer.
/o Go to the advanced boot options menu and restart the computer. Must be used with /r option.
/m \\computer Specify the target 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. If the time-out period is greater than 0, the /f parameter is implied.
/c "comment" Comment on the reason for the restart or shutdown. A maximum of 512 characters allowed.
/f Force running applications to close without forewarning users. The /f parameter is implied when a value greater than 0 is specified for the /t parameter.
/d [p|u]xx:yy Provide the reason for the restart or shutdown. p indicates that the restart or shutdown is planned. u indicates that the reason is user-defined. xx is the major reason number (positive integer less than 256). yy is the minor reason number (positive integer less than 65536).

Once your Windows computer is turned off, remember to turn it back on.

Post a Comment

Previous Post Next Post