While most Windows 11 users restart or shut down their computers using the Start menu, the same tasks can also be performed from Command Prompt using built-in Windows commands. This can be useful when troubleshooting system issues, creating scripts, managing remote computers, or when the graphical interface is unavailable.
Windows includes a powerful command called shutdown that allows you to restart, shut down, sign out, hibernate, or even schedule power-related actions directly from the command line. By using different command switches, you can control exactly how and when these actions occur.
In this guide, you’ll learn how to restart or shut down Windows 11 using Command Prompt, schedule automatic shutdowns, cancel pending shutdowns, restart remote computers, and understand the most useful shutdown command options available in Windows.
What Is the Shutdown Command in Windows 11?
Windows 11 includes a built-in command-line tool called shutdown that allows you to control power-related actions from Command Prompt. Using this command, you can restart, shut down, sign out, hibernate, or schedule a power action without using the graphical interface.
The shutdown command is commonly used by system administrators, IT professionals, and advanced users to automate tasks, troubleshoot problems, and manage local or remote computers.
The basic syntax of the command is:
shutdown [options]
By adding different switches, you can specify the action Windows should perform. For example, one switch can restart the computer, while another can schedule a shutdown after a specific amount of time.
Some of the most commonly used shutdown commands include:
- Restarting a computer
- Shutting down a computer
- Forcing applications to close
- Scheduling a shutdown
- Canceling a scheduled shutdown
- Restarting a remote computer
In the sections below, we’ll look at the most useful shutdown commands and how to use them in Windows 11.
How to Open Command Prompt in Windows 11
Before running shutdown commands, you’ll need to open Command Prompt. Most basic shutdown and restart commands work without administrator privileges, but some advanced commands may require an elevated Command Prompt.
Open Command Prompt
- Click the Start button.
- Type cmd or Command Prompt in the search box.
- Click Command Prompt from the search results.
Open Command Prompt as Administrator
- Click the Start button.
- Type cmd in the search box.
- Right-click Command Prompt.
- Select Run as administrator.
- Click Yes if prompted by User Account Control (UAC).

Once Command Prompt opens, you can begin using shutdown commands to restart or shut down your Windows 11 computer.
How to Restart Windows 11 Using Command Prompt
If you need to reboot your computer without using the Start menu, you can restart Windows 11 directly from Command Prompt using the shutdown command. This is useful for troubleshooting, running scripts, or remotely restarting a computer.
Restart Windows 11 Immediately
- Open Command Prompt.
- Type the following command and press Enter:
shutdown /r /t 0
What the Command Does
- /r — Restarts the computer.
- /t 0 — Sets the delay to 0 seconds, causing the restart to begin immediately.
After running the command, Windows will display a message indicating that the computer is about to restart, and the reboot process will begin.
Restart Windows 11 After a Delay
You can also schedule a restart for a later time by specifying the number of seconds.
For example, to restart the computer after 60 seconds:
shutdown /r /t 60
Windows will display a countdown notification before the restart occurs.

In the next section, we’ll look at how to shut down Windows 11 using Command Prompt.
How to Shut Down Windows 11 Using Command Prompt
The shutdown command can also be used to turn off your computer directly from Command Prompt. This can be useful when creating scripts, performing remote administration, or shutting down a system when the Windows interface is unavailable.
Shut Down Windows 11 Immediately
- Open Command Prompt.
- Type the following command and press Enter:
shutdown /s /t 0
What the Command Does
- /s — Shuts down the computer.
- /t 0 — Sets the shutdown timer to 0 seconds, causing Windows to shut down immediately.
After executing the command, Windows will begin the shutdown process and close the operating system.
Shut Down Windows 11 After a Delay
You can schedule a shutdown by specifying a delay in seconds.
For example, to shut down the computer after 5 minutes (300 seconds), run:
shutdown /s /t 300
Windows will notify you that a shutdown has been scheduled and display the remaining time before the computer powers off.

Next, we’ll look at how to force a restart when applications refuse to close normally.
How to Force Restart Windows 11 Using CMD
Sometimes a computer may become unresponsive because one or more applications refuse to close during the restart process. In such cases, you can use the shutdown command with the /f switch to force Windows to close running programs and restart the computer.
Use this option carefully, as unsaved work in open applications may be lost.
Force Restart Windows 11
- Open Command Prompt.
- Type the following command and press Enter:
shutdown /r /f /t 0
What the Command Does
- /r — Restarts the computer.
- /f — Forces running applications to close without warning.
- /t 0 — Starts the restart process immediately.

After running the command, Windows will close open applications and restart the computer without waiting for user input.
Force Shut Down Windows 11
If you want to force a shutdown instead of a restart, use:
shutdown /s /f /t 0
This command immediately closes running applications and powers off the computer.

In the next section, you’ll learn how to schedule an automatic shutdown using Command Prompt.
How to Schedule a Shutdown Using Command Prompt
Windows allows you to schedule a shutdown for a specific time in the future. This can be useful if you’re downloading large files, running a lengthy task, or want the computer to turn off automatically after a certain period.
The shutdown timer is specified in seconds using the /t switch.
Schedule a Shutdown After 1 Hour
To shut down the computer after 1 hour (3,600 seconds), run:
shutdown /s /t 3600
Schedule a Shutdown After 30 Minutes
To shut down the computer after 30 minutes (1,800 seconds), run:
shutdown /s /t 1800

Schedule a Restart Instead
If you want Windows to restart rather than shut down, replace /s with /r.
For example:
shutdown /r /t 1800
This command will restart the computer after 30 minutes.
Add a Custom Message (Optional)
You can display a message to users before the scheduled shutdown occurs.
Example:
shutdown /s /t 600 /c "The computer will shut down in 10 minutes."
The message will appear in the shutdown notification window.

If you change your mind after scheduling a shutdown or restart, you can cancel it using another shutdown command, which we’ll cover next.
How to Cancel a Scheduled Shutdown
If you’ve scheduled a shutdown or restart and no longer want it to occur, Windows allows you to cancel the pending action using the shutdown command.
This is useful if you accidentally entered the wrong timer value or decide you need to continue using the computer.
Cancel a Scheduled Shutdown or Restart
- Open Command Prompt.
- Type the following command and press Enter:
shutdown /a
What the Command Does
- /a — Aborts (cancels) a scheduled shutdown or restart.

If the command is successful, Windows will display a notification confirming that the scheduled shutdown has been canceled.
Important Note
The abort command only works while the shutdown or restart is still in its countdown period. Once Windows starts the actual shutdown or restart process, it can no longer be canceled using Command Prompt.
Next, let’s look at how to restart or shut down another computer on your network using CMD.
How to Restart a Remote Computer Using CMD
The shutdown command can also be used to restart or shut down another Windows computer on the same network. This feature is commonly used by IT administrators to manage multiple PCs without physically accessing each device.
Before using remote shutdown commands, both computers must be connected to the same network, and you must have administrative privileges on the remote computer.
Restart a Remote Computer
Use the following command:
shutdown /r /m \\ComputerName /t 0
Example
shutdown /r /m \\Office-PC /t 0
What the Command Does
- /r — Restarts the computer.
- /m \ComputerName — Specifies the remote computer.
- /t 0 — Restarts immediately.

Shut Down a Remote Computer
To remotely shut down a computer instead of restarting it, use:
shutdown /s /m \\ComputerName /t 0
Open the Remote Shutdown Dialog
Windows also provides a graphical remote shutdown tool.
- Open Command Prompt.
- Type the following command and press Enter:
shutdown /i - The Remote Shutdown Dialog will open.
- Add one or more computers.
- Choose whether to restart or shut down the selected devices.
- Click OK to execute the command.
If a remote shutdown command fails, verify that you have administrative permissions and that the target computer allows remote management through the Windows Firewall.
Common Shutdown Command Switches Explained
The shutdown command supports a variety of switches that control how Windows handles shutdown, restart, sign-out, and other power-related actions. Understanding these options can help you use the command more effectively.
| Command Switch | Description |
|---|---|
| /s | Shuts down the computer. |
| /r | Restarts the computer. |
| /l | Signs out the current user. |
| /f | Forces running applications to close. |
| /t xxx | Sets a delay in seconds before shutdown or restart. |
| /a | Cancels a scheduled shutdown or restart. |
| /m \ComputerName | Specifies a remote computer. |
| /i | Opens the Remote Shutdown Dialog. |
| /h | Puts the computer into hibernation mode. |
| /c “message” | Displays a custom message before shutdown. |
Useful Examples
- Restart immediately – shutdown /r /t 0
- Shut down immediately – shutdown /s /t 0
- Force restart – shutdown /r /f /t 0
- Schedule a shutdown in 30 minutes – shutdown /s /t 1800
- Cancel a scheduled shutdown – shutdown /a
Although these are the most commonly used switches, you can view the complete list at any time by running:
shutdown /?
This command displays Microsoft’s built-in help documentation for the shutdown command and all available options.

Conclusion
The shutdown command is a powerful built-in Windows tool that allows you to restart, shut down, force restart, schedule power actions, and manage remote computers directly from Command Prompt. Whether you’re troubleshooting a system, creating automation scripts, or simply prefer using the command line, knowing these commands can save time and provide greater control over your Windows 11 PC.
Frequently Asked Questions (FAQ)
Yes. Windows includes a built-in shutdown command that allows you to restart the computer directly from Command Prompt. This can be useful for troubleshooting, scripting, or managing a computer when the graphical interface is unavailable.
Yes. Command Prompt allows you to shut down Windows 11 without using the Start menu. You can perform an immediate shutdown or schedule one to occur at a later time.
A normal restart gives running applications time to close properly and save data. A force restart closes applications immediately, even if they are unresponsive. Because unsaved work may be lost, a force restart should only be used when necessary.
Yes. Windows allows you to schedule a shutdown or restart after a specific amount of time. This feature is useful if you’re downloading large files, running lengthy tasks, or want the computer to turn off automatically when you’re away.
If a shutdown or restart has been scheduled but has not yet started, you can cancel it before the countdown expires. Once Windows begins the actual shutdown process, it can no longer be stopped.
Yes. Windows supports remote restart and shutdown commands for computers on the same network. However, you must have the appropriate administrative permissions on the remote device, and network settings must allow remote management.
Yes. The shutdown command is a built-in Windows tool provided by Microsoft and is safe to use. It performs the same actions as the Restart and Shut Down options found in the Start menu, while also offering additional control and automation features.
Most basic restart and shutdown commands work on your own computer without administrator privileges. However, some advanced functions, such as managing remote computers, may require elevated permissions.





