If Windows freezes, the Start menu stops working, or you simply need a faster way to power off your PC, the shutdown command in Command Prompt can save you time. Instead of navigating through menus, you can shut down or restart your computer with a simple CMD command.
In this guide, you’ll learn how to use the Windows shutdown command to turn off or reboot your PC in Windows 10 and Windows 11. You’ll also see how to cancel a shutdown if you trigger it by mistake.
Shutdown Command Quick Reference (CMD)
If you just need the commands, use this table:
| Action | Command | What It Does |
|---|---|---|
| Shut down PC | shutdown /s | Turns off your computer |
| Restart PC | shutdown /r | Restarts Windows |
| Cancel shutdown | shutdown /a | Stops a pending shutdown |
| Log out user | shutdown /l | Signs out of your account |
| Shut down (exe syntax) | shutdown.exe /s | Same as /s using executable |
| Restart (exe syntax) | shutdown.exe /r | Same as /r using executable |
These commands work in Windows 10 and Windows 11.
How to Shut Down a Windows PC from CMD
If Windows is frozen or the Start menu isn’t working, you can still shut down your computer using Command Prompt.
Step 1: Open Command Prompt.
Press Windows + R, type cmd, then press Enter.

Step 2: Run the Shutdown Command.
In the Command Prompt window, type shutdown /s and press Enter.

Windows will display a message saying the system will shut down in less than one minute.
Optional: Shut Down Immediately (No Timer).If you don’t want to wait for the default countdown, you can force an immediate shutdown: shutdown /s /t 0. This turns off the PC instantly.
How to Restart Windows from Command Prompt
If you need to reboot your computer quickly, you can use the shutdown command with the restart parameter.
Step 1: Open Command Prompt.
Press Windows + R, type cmd and press Enter.
Step 2: Run the Restart Command.
In Command Prompt, type shutdown /r and press Enter.

Your PC will restart automatically after the default countdown.
Restart Immediately (No Countdown).
To restart Windows instantly without waiting: shutdown /r /t 0. This forces an immediate reboot.
Log Out Instead of Restarting.
If you only want to sign out of your account: shutdown /l
What Is the Shutdown Command?
The shutdown command is a built-in Windows command-line utility that lets you control system power actions directly from Command Prompt (CMD). It works in Windows 10 and Windows 11 and does not require any third-party software.
With this utility, you can:
- Shut down the computer
- Restart Windows
- Log off the current user
- Cancel a scheduled shutdown
- Set a shutdown timer
To view all available options and parameters, open Command Prompt,type shutdown and press Enter to display the full command syntax.

Shutdown Command Syntax Variations
Many users search for slightly different versions of the same command. All of the following refer to the same built-in Windows shutdown utility:
shutdown /sshutdown /rshutdown.exe /scmd shutdownwindows shutdown command
They all execute the same system tool — only the syntax or search wording changes.
Under the hood, the command runs shutdown.exe. This executable is located in the C:\Windows\System32 folder and is included in every modern version of Windows.
Because the System32 directory is part of your system path, you don’t need to type the full location — simply running shutdown from CMD works automatically.
How to Cancel a Shutdown in CMD
If you accidentally triggered a shutdown or restart, you can stop it using the shutdown abort command.
Simply type shutdown /a, then press Enter before the countdown finishes.
Important notes:
- The command only works while the timer is active.
- Once the PC shuts down or restarts, it cannot be undone.
- You will see a confirmation message when the shutdown is successfully canceled.
When to Use the CMD Shutdown Command
The shutdown command is especially useful in situations where the normal Windows interface isn’t working as expected. Instead of relying on the Start menu or power button, you can control your system directly from Command Prompt.
Using this command from Command Prompt makes sense when:
- Windows is frozen or unresponsive
- The Start menu does not open
- The power button is inaccessible
- You are connected via Remote Desktop
- You need a fast restart without navigating menus
It’s also helpful for troubleshooting, remote support sessions, and situations where speed matters.
Frequently Asked Questions About the Shutdown Command
The shutdown command is a built-in Windows utility that lets you shut down, restart, log off, or schedule power actions from Command Prompt (CMD). It works in Windows 10 and Windows 11 without requiring additional software.
To restart your PC using Command Prompt, open CMD and type shutdown /r and press Enter. Your computer will restart after the default countdown. To restart immediately, use: shutdown /r /t 0
If a shutdown or restart is already scheduled, you can stop it by typing shutdown /a. Press Enter before the countdown finishes. This cancels the pending shutdown.
Yes. You can set a shutdown timer using the /t parameter. For example: shutdown /s /t 600. This shuts down your PC in 10 minutes (600 seconds). You can cancel it anytime using shutdown /a.
The shutdown command runs the executable file shutdown.exe, which is located in: C:\Windows\System32. Because this folder is included in the system path, you can run shutdown directly from CMD without typing the full location.
Yes. The shutdown command works the same way in Windows 10 and Windows 11. The syntax and parameters remain unchanged.





