How to Shut Down or Restart a Remote Computer? [3 Ways]

About Windows Shutdown/Restart Commands

To shut down a computer, you can open the Windows Command Prompt/PowerShell and type shutdown, and press Enter. If you want to know more command lines about the showdown command, type shutdown / and hit Enter. Here we list the most commonly used options.

  • /s: Shut down the computer
  • /r: Restart the computer
  • /m \\computer: Specify the target computer
  • /t xxx: Set the time-out period before shutdown to xxx seconds
  • /l: Log off
  • /c “comment”: Comment on the reason for the restart or shutdown

How to Shut down or Restart a Remote Computer

Way 1. Shut Down or Restart a Remote Computer with PowerShell

Firstly, follow the steps below to open the elevated Command Prompt window on the PC1.

Step 1. Type cmd in the Search box, and then right-click the Command Prompt app and select Run as administrator.

Step 2. In the elevated Command Prompt window, you can refer to the following examples to shutdown/ restart remote computer CMD.

Example 1: Shutdown or restart a remote computer:

  • shutdown /s /m \\pc2 (shutdown)
  • shutdown /r /m \\pc2 (restart)

Example 2: Restart a remote computer with a custom message:

shutdown /m \\pc2 /c “The IT department has initiated a remote restart on your computer”

Then you will receive a pop-up message on the remote computer with the custom message.

Example 3: Immediately restart a remote computer countdown:

shutdown /r /m \\pc2 /t 0

If you want to restart the remote computer with a longer countdown, you can specify the seconds such as /t 60.

Example 4: Log user off on the remote computer:

shutdown /l /m\\pc2

Way 2. Shut Down or Restart a Remote Computer with CMD

To shut down or reboot remote computer PowerShell, you need to open the elevated PowerShell window like open the Command Prompt window, and then run the following commands.

Example 1: PowerShell restart computer remotely:

Restart-Computer -ComputerName REMOTE_COMPUTER_NAME -Force

This command will immediately restart the remote command and the Force option will force a restart even if the user is logged on.

Example 2: PowerShell shut down a computer remotely:

Stop-Computer -ComputerName REMOTE_COMPUTER_NAME -Force

Example 3: PowerShell shut down two computers remotely:

Stop-Computer -ComputerName “Server01”, “Server02”

Example 4: PowerShell restart a list of computers remotely:

If you want to restart multiple computers remotely, just list all these computers that you want to restart in a text file and add it to the PowerShell command.

restart-computer (get-content c:\work\computers.txt)

Way 3. Shut Down or Restart a Remote Computer with the Remote Desktop Protocol

Step 1. Press Win + I keys to open the Settings window and select System.

Step 2. In the Settings window, select Remote Desktop from the left panel.

Step 3. Toggle on the switch next to Enable Remote Desktop from the right side of the window.

Step 4. Click on Confirm in the prompted window.

Step 5. Click on the Start menu at the left bottom corner of your screen and select Shut down or Restart.


Ariel is an enthusiastic IT columnist focusing on partition management, data recovery, and Windows issues. She has helped users fix various problems like PS4 corrupted disk, unexpected store exception error, the green screen of death error, etc. If you are searching for methods to optimize your storage device and restore lost data from different storage devices, then Ariel can provide reliable solutions for these issues.

Originally published at on March 3, 2022.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store