If you use more than one computer, you might find it hard to manually restart them all. To make the job easier, you can just use a simple CMD command to restart these computers.
Page Contents:
For this to work, all of your PCs will need to be on the same network as a Remote computer. You will also need the login information for the PC’s administrator account.
Using CMD to restart a remote computer is easy and will save you time and keep you from having to go to each computer and do it by hand. In this article, we’ll talk about different ways to use CMD to restart a remote computer.
Ways to Restart a Remote Computer Using CMD
Here are the three ways to use the CMD to restart a remote computer.
1. Use the Shutdown Command
The shutdown command is the first step in using CMD to restart a remote computer. Follow the steps below to do this:
- Press the Windows key and search for CMD. Run the Command Prompt as administrator.
- Now, type the command- shutdown /m \\computername /r in the command prompt. Here, you will have to replace computername with the name of the computer you want to restart.
- If you want to close all the programs before restarting, type /f one space after /r.
- Add /c after /f in the command. Then type a message in quotes to notify you about restarting your PC. The command should look like the below-
- shutdown /m \\computername /r /f /c “This computer is about to restart”
- Add /t xx command on it. Here xx represents the time duration for your computer to restart. Now, the new command will look like this-
- shutdown /m \\computername /r /f /c “This computer is about to restart” /t 30
- At last, press Enter to execute the command.
NOTE– Some commands that have been used above are explained below-
- /r – It is used for restarting a computer.
- /s – It is used for shutting down a computer.
- /m \\computername – This command specifies the remote computer to restart or shutdown.
- /l – Stands for logging off the computer.
- /t xx – Tells the duration when setting the timeout period before restart or shutdown to xx seconds.
- /c “comment” – Used to display on the screen before restart or shutdown.
2. Windows PowerShell
Windows PowerShell can also be used to restart computers that are far away. Here is the command for Windows PowerShell to restart your computer:
- In the Start Menu, search for Windows PowerShell. Right-click on it and select the Run as administrator option.
- To restart a remote computer, type and execute the following command:
Restart-Computer -ComputerName REMOTE_COMPUTER_NAME -Force
Note- Here, replace REMOTE_COMPUTER_NAME with the name of the computer you want to restart.
3. Remote Shutdown Dialog
Using this method, you can select whether or not to restart the computer after it has been shut off. The following are the methods to restart your PC using the Remote Shutdown Dialog:
- Open Start Menu, and search for Command Prompt. Run the Command Prompt with administrative privileges.
- Then, type the command given below and execute it-
- shutdown -i
- Next, on the remote shutdown dialog window, click on the Add button.
- Type the computer’s IP address that you want to restart and click OK.
- Now, under the dropdown menu of What do you want these computers to do, select Restart.
- Check the checkbox for Warn users of the action and set the time in seconds next to the Display Warning field.
- Now, click on the Planned checkbox. This will create an event tracker from the remote restart.
- Next, select a reason from the dropdown list for the restart. Under the comment section, type a comment that you want to be displayed before the computer restarts. Once done, click on OK, and your computer will restart.
Conclusion
Restarting a remote machine with CMD is easy when you know how, and this article explains how in three simple steps. Restarting your remote PC with CMD is simple if you use the procedures outlined above.