Using the Command Prompt to turn off your Windows 10 PC provides more options and flexibility than merely using the shutdown option from the Start menu or pressing the power button on your PC. Here’s how it’s done.
RELATED: How to Turn On a Windows 11 or Windows 10 PC
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 then select the “OK” button.
This will open the Command Prompt. Here, type shutdown /s .
Once you press Enter, a message will appear letting you know that Windows will shut down in less than a minute. You can select the “Close” button if you like, but this will not affect the shutdown process.
That’s all there is to it. Within the minute, your PC will shut down. There’s also a way of restarting your PC using the Command Prompt if that’s what you prefer.
RELATED: 34 Useful Keyboard Shortcuts for the Windows Command Prompt
Restart Your PC Using the Command Prompt
This process for restarting your PC is nearly identical to shutting down your PC, except you’ll 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, and then select the “OK” button to open the Command Prompt.
Once in the Command Prompt, type shutdown /r .
Press the Enter key to proceed. 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. To get a full list of shut down options available to you, type shutdown /? in the Command Prompt and then press Enter. A complete list of switches and respective descriptions will be displayed.
For the convenience of our readers, we’ve provided the complete list of the shutdown commands and descriptions provided by Microsoft below.
RELATED: Why Does Rebooting a Computer Fix So Many Problems?
List of Command Prompt Shutdown Switches and Parameters
Once your Windows computer is turned off, don’t forget to turn it back on.
After sign in, restart any registered applications.
After sign in, restart any registered applications.
This can only be used during the time-out period.
Combine with /fw to clear any pending boots to the firmware.
It can be used with /d and /f options.
It can be used with the /f option.
Must be used with /s option.
Must be used with /r option.
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.
A maximum of 512 characters allowed.
The /f parameter is implied when a value greater than 0 is specified for the /t parameter.
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).