How to Shut Down a Computer using Command Prompt?
Last Updated :
28 Nov, 2024
Shutting down your computer via the Command Prompt is a useful method that can help you perform a clean shutdown without having to use the standard Windows interface. Below are the steps to guide you through the process, along with some variations for advanced shutdown options.
Shut Down Your PC Using the Command Prompt – 3 Methods
Now, we will be performing 3 different methods to shut down your computer using CMD. Let’s find out:
1. Basic Shut Down Command using CMD
One of the basic and mostly used methods is by running the following command:
Step 1: Open “Run” and type CMD
Hit the Windows + R, type “CMD” or command prompt and hit the Enter button.

Run
Step 2: Run /s command to Shut Down Your PC
Once you enter the command prompt, type the following command.

/s
Now, you will see a pop-up for shut down the PC. This will immediate shut down your computer. However, you can also choose to cancel this method using the following command.
How to Cancel the Shut Down
However, you can also choose to cancel this method using the following command:
Shutdown /a
2. Time Delay Shut Down using CMD
You can also schedule to shut down you system using any specific time. Here, we have taken 60 seconds as an example. Let’s follow the steps and command for te same.
Step 1: Open CMD
Go to Run and type CMD. Now, hit the Enter button

CMD
Step 2: Run /s /t Command
If you want your computer to shut down after 1 minute (60 seconds), use the following command:
shutdown /s /t 60

Timer
Note: Your system will shut down right after 60 seconds. So, ensure to save all your unsaved data to avoid any data loss. However, you can also choose to cancel this method using the following command.
How to Cancel the Time Delay Shut Down
You can also choose to cancel this method using the following command:
Shutdown /a
where, a -> is to abort any scheduled shutdown (within the scheduled time frame).
3. Force Shut Down using CMD
You may also choose to force shut down your system if some applications are blocking the shutdown by following these methods:
Step 1: Open CMD
Go to Run and type CMD. Now, hit the Enter button

Open CMD
Step 2: Run /s /f /t Command
Now, use the following command to force shut down your system.
shutdown /s /f /t 60

Force Shutdown
Note: This command will force down your Windows system within next 60 seconds.
4. Remote Shut down using CMD
If you wish to shut own your system remotely then follow the steps below:
Step 1: Prepare the Remote Computer
Ensure that the remote computer allows remote shutdowns via its firewall settings (the “File and Printer Sharing” feature should be enabled, and the Windows Management Instrumentation (WMI) service should be running).
Step 2: Execute the Command
Now, use this command to shut down your system remotely
shutdown /s /f /t 0 /m \\RemoteComputerName
Here, RemoteComputerName -> remote computer network’s IP
How to Restart Your System Instead of Shut Down
You can also choose to restart your system instead of shutting it down. Let’s understand this how you can perform it in few easy steps.
Step 1: Open Command Prompt
Go to “Run” and type “CMD” and hit the Enter button.

CMD
Now, type the following command to perform an immediate restart of your Windows PC.
shutdown /r /t 0
Here, r -> is the function to restart, and /t 0 -> is to perform an immediate Restart.
How to Remote Restart the Computer
You can also Restart your computer remotely using the following command:
shutdown /r /f /t 0 /m \\RemoteComputerName
Conclusion
Shutting down your computer using Command Prompt is a quick and efficient way to manage your system, whether you’re performing a local shutdown or managing multiple machines remotely. With simple commands, you can control when and how your computer shuts down or restarts. Using the above commands, you can choose to
either shut down immediately, or even restart your machine.
Similar Reads
How to Format a Hard Drive Using the Command Prompt
Formatting a hard drive is a common step when setting up a new disk or repurposing an old one. Although there are various methods to format in Windows, using the Command Prompt offers a fast and efficient option, particularly for advanced users. This article will show you how to format a hard drive
4 min read
How to Use Command Prompt - Windows Command Prompt Guide
Learn how to manually run the Command Prompt in different versions of Windows - The Windows Command Prompt (CMD) is a powerful tool that allows users to execute commands, automate tasks, and troubleshoot system issues efficiently. Whether youâre a beginner looking to learn basic CMD commands or an a
5 min read
How to Abort a Command Execution in Command Prompt?
When working in the Command Prompt, there are times when you need to halt a running command immediately. Understanding how to abort command execution in CMD can save you from potential issues and wasted time. In this guide, we'll explore various methods to stop commands, including using `Ctrl+C`, te
5 min read
How to Open Command Prompt with Keyboard Shortcuts
The Command Prompt is one of the most powerful tools on your Windows system, offering quick access to run commands, perform tasks, and manage system settings. But what happens when your mouse is not working or you are facing any issue with your laptop touchpad? So, in that time, knowing how to open
6 min read
How to Clear the Windows Command Prompt Screen
If you've been working in the Windows Command Prompt and your screen is cluttered with text, knowing how to clear the Windows Command Prompt screen can make your workspace much tidier and easier to manage. This simple task can help you focus on the commands you're working on without distraction. In
6 min read
How to Change Windows Computer Password using CMD
If you are a Windows user, one of the easiest ways to change your password is through the Command Prompt (CMD). This is especially helpful for users who prefer command-line tools or face issues accessing the standard settings menu. In this article, weâll guide you through the steps to change your Wi
4 min read
How to Repair Windows 10 Using Command Prompt - 5 Methods
Is your Windows 10 not working right? Maybe itâs slow, keeps crashing, or wonât start properly. These problems can be annoying, but you donât have to do something big like reinstalling Windows yet. Thereâs a handy tool called Command Prompt that can fix many Windows issues, and itâs already on your
6 min read
How to set up a PHP Console ?
PHP is a backend server-side language of web development. In general, we don't need to take input from the console but sometimes we need to run a small function or block of code, for which we need to take input from the console. Requirements: Server: xampp or WampServer How to set up PHP Console ? S
1 min read
How to Open Command Prompt in Windows 11, 10, 8, 7
The Command Prompt is a powerful tool in Windows for executing commands, troubleshooting issues, and automating tasks. Whether you're using Windows 11, 10, 8, or 7, this guide covers all the methods to open Command Prompt quickly and efficiently. 8 Proven Methods to run the Command Prompt (cmd) in W
8 min read
How to Open the Command Prompt as Administrator in Windows
The Command Prompt is a powerful tool in Windows that lets you run commands to manage files, troubleshoot problems, and control system settings. But some commands require administrator access to work properly. Opening the Command Prompt as an administratorâoften called âelevated modeâ gives you full
6 min read