How to Remotely Restart Windows 11/10 using PowerShell

A prerequisite to these methods is to ensure that we can contact the remote systems and authenticate as necessary. And also, you need to verify that a remote system is not pending a reboot. You’ll need the following:

A user account on the remote computer in the local administrator’s group.Windows PowerShell or PowerShell Core.

1] Restart a remote computer with Restart-Computer

This cmdlet is simple to use with flexible parameters. An additional prerequisite for the command to work is, ensure that WinRM is configured and allowed through the remote computer’s Windows firewall and that WMI is allowed through the Windows firewall. To restart multiple computers in parallel, run the following command:

2] Restart a remote computer with Invoke-CimMethod

The Invoke-CimMethod works by using a WIM method to reboot the remote system – although, not as flexible as the Restart-Computer cmdlet. An additional prerequisite for the command to work is, ensure that WinRM is configured and allowed through the remote computer’s Windows firewall.

3] Restart a remote computer with shutdown.exe

The shutdown.exe is the standard built-in executable that Windows offers to restart a system, and it’s not a PowerShell command but offers a robust series of options. An additional prerequisite for the command to work is, ensure that the remote computer has the Remote Registry service enabled and WMI allowed through the Windows firewall.

4] Restart a remote computer with PSExec.exe

One of the most used utilities within the Sysinternals toolkit, psexec.exe offers several unique abilities that make interacting with a remote system easy. An additional prerequisite for the command to work is, ensure the SMB Service is running, file and printer sharing is enabled, simple file sharing is disabled and the admin$ administrative share is available.

5] Restart a remote computer with RunDLL32.exe

The rundll32.exe offers a way to run certain methods against internal executables and Windows APIs, such as shell32.dll. There are two methods you can restart a system using this functionality but this method cannot be actually used remotely by itself, you can combine this with PowerShell via an Invoke-Command on a remote system. Method 1: Method 2:

6] Restart a remote computer with Taskkill.exe

Last but not the least, taskkill.exe is one other Windows utility that offers some functionality to restart Windows, though in a roundabout way. By ending the lsass.exe process, you will force a Windows restart. That’s it on the 6 ways to use PowerShell to restart a remote computer!

How to Remotely Restart Windows computer using PowerShell - 60How to Remotely Restart Windows computer using PowerShell - 38