skip to Main Content

Restart remote computer with PowerShell

Why do we need to restart a remote computer with PowerShell? We had to test new software, and the computer stopped responding after clicking the File Explorer. The problem is that we could not end any tasks. The computer is hours away from us, and nobody was in the area. What is the best solution? The best approach is to restart the computer remotely. In this article, you will learn how to restart a remote computer with PowerShell.

Restart remote computer with PowerShell

Run PowerShell as administrator. We are going to make use of the Restart-Computer cmdlet. The computer’s name is PC01.

That didn’t work. Why is that?

There are users logged in on the computer, and we can’t restart the remote computer. If there are no users logged in, a restart will immediately start without fail.

Restart remote computer with PowerShell Force

We have to use the -Force parameter to restart the computer. Doing that will immediately restart the computer without a countdown.

The computer is restarting.

Ping remote computer

After running the above cmdlet, ping the computer. It will show us if we can reach the computer.

The ping is showing a reply, request timed out, and reply of the remote computer:

  1. In the beginning, a reply is showing because the computer is still connected.
  2. After a couple of seconds, we can’t see a reply. We see a request timed out because the computer is offline.
  3. The computer is starting again, and a reply is showing.

The computer is back online, and we can access the computer with remote desktop.

It’s good to know how to restart computers remotely. The next time you want to restart a computer, make sure to use PowerShell. I hope that this article helped you.

Read more: Exchange setup can’t continue PowerShell has open files »


In this article, you learned how to restart remote computer with PowerShell. Run the Restart-Computer cmdlet as shown to restart the remote computer. You can always check if the computer is going offline and starting again by pinging the computer.

Did you like this article? If so, you may also like to read Enable Windows Firewall with PowerShell. Follow us on Twitter and LinkedIn to stay up to date with the latest articles.



ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has One Comment

  1. You can reboot the remote computer in the following way, with credentials from powershell:

    Restart-Computer -ComputerName -Force –user


    Restart-Computer -ComputerName tests -Force –user

    (it will ask you to enter the administrator credentials of the team in question)

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top