Ellie

By Ellie Twitter / Last Updated December 21, 2022

How do I remotely restart a remote computer?

 

I am a Windows System Administrator and responsible for managingmy clients’ remote computers. How do I remotely restart a remote computer?”

- Question from Reddit

Sometimes, we may have the request to remotely restart or shutdown a remote computer. There are three tools available to restart a Windows computer using command lines. Let’s take a look.

Restart Computer

How to restart remote computer command line

You’re able to restart remote computer command lineusing Command Prompt, PowerShell, and PsExec. Before starting, you’ll need some preparation work to configure the target computer to allow the remote restart.

Preparation work

You need to confirm the following five settings for the restart command line to take effects.

1. Both devices are connected to the same local area network.

2. Have the administrative user rights of the remote computer you want to restart.

3. Get the remote PC’s IP address or username.

Step 1. Press Windows key + R to invoke the Run dialog box. Type in “cmd” and press OK.

Run Box CMD

Step 2. Then type “ipconfig”and press Enter. Now you can see a group of IP addresses, of which the IPv4 address is the one you need.

Find the Computer Name in the Console

Step 3. Then type “query user”to see the PC name.

Find the Username in the Control Panel

4. Confirm Remote Registry is properly set.

Step 1. Open the Run dialog box. Type in “services.msc” and press OK.

Services.msc

Step 2. Scroll down, find and click Remote Registry.

Remote Registry

Step 3. Select Automatic from the Startup type drop-down menu, then click OK.

Startup Type Automatic

5. Set certain Firewall ports.

Open Control Panel and navigate to System and Security > Windows Defender Firewall > Allow apps, click Change settings, and tick Windows Management Instrumentation (WMI).

Windows Management Instrumentation

Way 1. Restart remote computer via Command Prompt

The first tool is the Windows built-in Command Prompt. You don’t need to install it. Just open it and send reboot command to remote computer.

Step 1. On the remote PC, search "cmd" in the search box, and then right-click on it, choose Run as administrator.

Run as Administrator

Step 2. To see a complete list of shutdown commands, type shutdown /? in the Command Prompt.

Command List

Step3. To restart the computer, type "/r" one space after the computer name. The complete command line is:

  • shutdown m \\COMPUTERNAME /r

Restart Command Line

Way 2. Restart remote computer via PowerShell

The second tool you can use to send restart command to remote computer PowerShell is also already built in Windows.

Step 1. Right-click the Start menu, and click Windows PowerShell (Admin).

Windows PowerShell

Step 2. Type in the following remote reboot Windows 10/11 PowerShell command:

  • Restart-Computer -ComputerName REMOTE_COMPUTER_NAME -Force

(Enter the IP or username of the computer you want to restart instead of REMOTE_COMPUTER_NAME)

PowerShell Restart Computer

Step 3. Then your remote computer will restart automatically.

If you need to restart a list of computers, just list all the computers you want in a text file and add that to the PowerShell command.

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

Way 3. Restart remote computer via PsExec

PsExec is a Microsofttool that allows you to run commands on a remote computer. PsExec is not installed by default on any Windows operating system. You’ll need to install it manually.

Step 1. Download PsExec on the computer that will be running the remote commands.

Step 2. Right-click on the ZIP file downloaded and select Extract All.

extract-all-files

Step 3. Open the folder where the extracted file is located. Enter “cmd”in the search box and then press Enter.

search-cmd

Step 4. Then the Command Prompt in that folder will open. You can now run commands through PsExec.

cmd-pstools

Step 5. The basic syntax to perform a remote restart is shown below:

  • PsExec.exe \\remote-pc-name shutdown /r

For example, to restarta remote computer named CLOUD-9GA5IF08G, run the following command:

  • PsExec.exe \\CLOUD-9GA5IF08G shutdown  /r

Reboot Using Psexec

Bonus tip: How to restart Windows computer with ease

Command lines are a little bit tech-demanding. People who are not very tech-savvy may want an easier way to remotely restart a computer. We recommend you use AnyViewer. It is a free remote desktop tool that would allow users to remotely restart, shut down, or lock a computer. Besides, it also can be used eve they two computers are not on the same network, which is quite convenient for people to carry out remote work.

Download Freeware Win 11/10/8.1/8/7
Secure Download

Step 1. Open AnyViewer on the host device, go to Log in and then click Sign up.

Log in AnyViewer

Step 2. Fill in the information > click Sign up.

Sign Up for AnyViewer

Step 3. On the client device, log in to the same account and then you can see the assigned devices.

Free Editions

Step 4. Go to Device, select the computer you want to restart and click Reboot.

Reboot Remote PC

Tip: You can also restart your device in a remote session if you want to first manage your computer remotely.

Step 1. Back to Device, select the computer, and click One-click control.

Connect to My Devices

Step 2. Now you can see the host desktop and control it. When you want to restart the computer, click Operation from the upper toolbar > Restart.

You can also chat, transfer files, change the image quality, etc.

Operation Restart AnyViewer

Conclusion

This post primarily offers 3 ways to restart remote computer command line. The tools are Command Prompt, PowerShell, and PsExec. If you want to an easier way to restart a remote computer instead of the complicated command lines, you can choose AnyViewer.