How to Remotely Shut Down or Restart a Windows 10 or 11 Computer

·
8 min read

Help Desk Geek is reader-supported. We may earn a commission when you buy through links on our site. Learn more.

You’ve been struggling to remotely shut down or restart a Windows computer without sitting in front of it. Windows 10 and Windows 11 can handle this over a local network or VPN, but the target PC needs the correct permissions and firewall rules.

Fix #1: Prepare the target Windows computer

Complete these steps on the computer you want to control. Both PCs must be connected to the same local network or a VPN that provides access to that network.

  1. Sign in to the target PC using an administrator account.
  2. Open Settings > Accounts > Your info.
  3. Confirm that Administrator appears under the account name.
Windows 11 Settings > Accounts > Your info showing an account with Administrator status

The account sending the shutdown command must have administrator rights on the target PC. On a work domain, use an authorized domain account instead.

  1. Press Windows + R, type sysdm.cpl, and press Enter.
  2. Select the Computer Name tab.
  3. Write down the Full computer name.
Windows System Properties Computer Name tab with the Full computer name highlighted

You’ll use this name in the remote shutdown commands. An IP address also works if Windows can’t resolve the computer name.

  1. Open Settings > Network & internet.
  2. Select the active Ethernet or Wi-Fi connection.
  3. Set Network profile type to Private network.
Windows 11 Settings showing the active network connection set to Private network

Don’t use these remote-management rules on a public network.

  1. Search for and open Control Panel.
  2. Select Network and Internet > Network and Sharing Center.
  3. Select Change advanced sharing settings.
  4. Turn on Network discovery for private networks.
Windows advanced sharing settings with Network discovery enabled for Private networks

The target PC should now be discoverable by other devices on the private network.

  1. Search for and open Windows Defender Firewall.
  2. Select Allow an app or feature through Windows Defender Firewall.
  3. Select Change settings.
  4. Allow Windows Management Instrumentation (WMI) and Remote Service Management on Private networks.
Windows Defender Firewall allowed apps list with Windows Management Instrumentation and Remote Service Management enabled for Private networks

The firewall should now accept the management traffic used by remote commands. Leave the Public checkboxes cleared.

  1. Press Windows + R, type secpol.msc, and press Enter.
  2. Open Local Policies > User Rights Assignment.
  3. Double-click Force shutdown from a remote system.
  4. Add Administrators or the specific administrator account that will send the command.
  5. Select OK.

The chosen account should appear in the policy list. Don’t add Everyone, because that grants remote shutdown rights too broadly.

Fix #2: Use the Remote Shutdown Dialog

The Remote Shutdown Dialog handles one or several computers without requiring you to remember every command switch.

  1. Open the Start menu and search for Command Prompt.
  2. Select Run as administrator.
  3. Enter shutdown /? if you want to view the available command options.
Administrator Command Prompt showing the current shutdown command help output

You should see the supported switches for shutdown.exe.

  1. Enter shutdown /i and press Enter.
Administrator Command Prompt with shutdown /i entered

The Remote Shutdown Dialog should open.

Current Windows Remote Shutdown Dialog with Add, Browse, action, warning, reason, and comment controls visible
  1. Select Add.
  2. Enter the target’s computer name or IP address.
  3. Select OK.
Remote Shutdown Dialog Add Computers window containing a Windows computer name

The computer should appear under Computers. Repeat these steps to add more PCs.

  1. Open the What do you want these computers to do? menu.
  2. Select Shutdown or Restart.
  3. Choose whether Windows should warn signed-in users.
  4. Set the warning duration if you enabled it.
  5. Select an appropriate reason.
  6. Enter a specific comment, such as Restarting after Windows updates.
  7. Select OK.

Windows should send the selected action to every listed computer. Unsaved work can be lost, so use the warning option when someone may be signed in.

Fix #3: Run a remote shutdown command

The direct command is faster when you already know the target computer’s name.

  1. Open Command Prompt as administrator.
  2. Run ping ComputerName, replacing ComputerName with the target’s name.
  3. Confirm that the command returns replies from the target PC.

If name lookup fails, repeat the test with the target’s IP address. Check the network or VPN connection if neither responds.

  1. To shut down the target immediately, run shutdown /m \\ComputerName /s /t 0.
  2. Replace ComputerName with the target’s actual name or IP address.

The target PC should begin shutting down immediately.

  1. To restart it instead, run shutdown /m \\ComputerName /r /t 0.

The target should close Windows and restart.

These switches control the action:

SwitchAction
/m \\ComputerNameSelects the remote computer
/sShuts down Windows
/rRestarts Windows
/t 60Waits 60 seconds before acting
/fForces open apps to close
/c "Message"Records a comment
/d p:4:1Records a planned reason code
/aCancels a pending shutdown
/gRestarts and reopens registered apps
/sgShuts down, then signs in and restores registered apps
/hybridPerforms a shutdown prepared for Fast Startup

Use /f carefully. It closes applications without giving users a chance to save their work.

  1. To schedule a restart with a warning, run shutdown /m \\ComputerName /r /f /t 60 /c "Rebooting after updates".
Target Windows desktop showing the full signed-out or shutdown warning message generated by shutdown.exe

The target should display the message and restart after 60 seconds.

  1. To cancel the scheduled action before its timer expires, run shutdown /m \\ComputerName /a.

You should receive confirmation that the shutdown was canceled.

Fix #4: Create a batch file for multiple computers

A batch file solves the repetitive work of restarting the same group of PCs.

  1. Open Notepad.
  2. Enter one command per target computer:
shutdown /m \\PC1 /r /f /t 60 /c "Scheduled network restart"
shutdown /m \\PC2 /r /f /t 60 /c "Scheduled network restart"
shutdown /m \\192.168.1.10 /r /f /t 60 /c "Scheduled network restart"
  1. Replace each sample name or IP address with a real target.
  2. Select File > Save As.
  3. Set Save as type to All files.
  4. Enter a filename ending in .bat, such as Restart-Network-PCs.bat.
  5. Select Save.
Notepad Save As window saving Restart-Network-PCs.bat with Save as type set to All files

The saved file should have a Windows batch-file icon rather than a .txt extension.

  1. Right-click the batch file.
  2. Select Run as administrator.

Each reachable computer should receive the restart command. You can also configure the file in Task Scheduler, but unattended shutdowns need a warning period to protect unsaved work.

The existing guide to how to use batch files in Windows explains the file format in more detail.

Fix #5: Use PowerShell remoting

PowerShell handles remote shutdowns well on managed networks, especially when remoting is already configured.

  1. Open Windows PowerShell as administrator on the target PC.
  2. Run Enable-PSRemoting.
  3. Confirm the requested changes.

PowerShell should configure its remoting service and firewall access.

  1. Open an elevated PowerShell window on the controlling PC.
  2. Run Stop-Computer -ComputerName "ComputerName" -Force to shut down the target.

The remote PC should shut down.

  1. Run Restart-Computer -ComputerName "ComputerName" -Force when you need a restart instead.

The remote PC should restart. Authentication and firewall policies can still block these commands on workgroup or domain networks.

Fix #6: Shut down through Remote Desktop

Remote Desktop is a practical option when you need to inspect the PC before turning it off. The target must support incoming Remote Desktop connections and have the feature enabled.

  1. Search for and open Remote Desktop Connection.
  2. Enter the target computer’s name or IP address.
  3. Select Connect.
  4. Sign in with an authorized account.
  5. Open the Start menu inside the remote session.
  6. Select Power.
  7. Choose Shut down or Restart.

The Remote Desktop session should disconnect as the target performs the selected action.

Fix #7: Resolve “Access is denied (5)”

“Access is denied (5)” means the target rejected your account or stripped its administrator privileges during the remote connection.

  1. Confirm that your account is an administrator on the target PC.
  2. Confirm that the account appears under Force shutdown from a remote system in Local Security Policy.
  3. Confirm that WMI and Remote Service Management are allowed through the target’s firewall.
  4. Retry the shutdown command from an elevated Command Prompt.

If the error remains and you’re using a local administrator account, Windows’ remote UAC filtering may be blocking it. The following registry change relaxes that protection, so I’d skip this step unless the earlier checks fail.

  1. Open Registry Editor as administrator on the target PC.
  2. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System.
  3. Right-click System and select New > DWORD (32-bit) Value.
Registry Editor at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System with New DWORD (32-bit) Value selected
  1. Name the value LocalAccountTokenFilterPolicy.
  2. Double-click the new value.
  3. Set Value data to 1.
  4. Select OK.
Registry Editor showing LocalAccountTokenFilterPolicy as a DWORD with value data 1

The local administrator account should retain its administrative token during remote operations. This setting weakens a remote UAC safeguard, so keep the firewall restricted to trusted private networks.

You can make the same change from an elevated Command Prompt by running:

reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f

The command should report that the operation completed successfully.

Fix #8: Resolve “The RPC server is unavailable”

“The RPC server is unavailable” means the controlling PC can’t reach the target’s Remote Procedure Call services.

  1. Run ping ComputerName from the controlling PC.
  2. Retry with the target’s IP address if the name doesn’t respond.
  3. Confirm that both PCs are on the same private network or connected VPN.
  4. Open services.msc on the target.
  5. Confirm that Remote Procedure Call (RPC) is running.
  6. Recheck the firewall rules for Windows Management Instrumentation (WMI) and Remote Service Management.
  7. Retry the remote shutdown command.

The command should work after connectivity, name resolution, services, and firewall access are restored.

Don’t expose RPC or WMI ports directly to the internet. Use a VPN, Microsoft Intune, or an approved remote-management platform for computers outside your local network.

When the methods don’t work

Domain Group Policy can override local permissions and firewall settings. Ask the network administrator to check the remote-shutdown user right and applicable firewall policies if local changes keep reverting.

For managed Windows devices, Microsoft Intune provides a remote Restart action under the selected device’s controls. Sysinternals PsShutdown is another option for administrators who need scripting and multi-computer support.

Conclusion

Fix #2, using shutdown /i, usually works best once the target PC’s permissions and firewall rules are correct. Repeated “Access is denied (5)” or RPC errors point to account policy, UAC filtering, or network configuration rather than a broken shutdown command.