sodcalculator

10 Tech How-To

Shutdown a Computer Remotely: Step-by-Step

Guide 10-21572 · Updated · Step by step

This guide shows you how to shut down or restart a Windows computer from another PC on the same network. You’ll use built-in Windows tools—no extra software needed. You’ll need administrator access on the target computer and both machines must be on the same local network (or connected via VPN).

What You’ll Need

  • Both computers running Windows (Pro, Enterprise, or Education editions—Home lacks the Remote Shutdown feature).
  • Administrator credentials for the computer you want to shut down.
  • Both computers on the same network or connected through a VPN.
  • File and printer sharing enabled on the target computer.
  • Remote Registry service running on the target computer (it usually is by default).

Step-by-Step

  1. Find the target computer’s name or IP address. On the target PC, open Command Prompt and type hostname to get its name, or use ipconfig to find its IPv4 address (e.g., 192.168.1.10).
  2. Enable Remote Shutdown on the target computer. On the target PC, press Win + R, type services.msc, and press Enter. Find “Remote Registry,” right-click it, and select “Start” if it isn’t running. Set its Startup type to “Automatic” if you plan to use this often.
  3. Allow the shutdown through Windows Firewall. On the target PC, open Control Panel → System and Security → Windows Defender Firewall → Allow an app or feature through Windows Firewall. Click “Change settings,” then check “Windows Management Instrumentation (WMI)” for both Private and Public networks. If you don’t see it, click “Allow another app” and add C:\Windows\System32\wbem\WMIC.exe.
  4. Enable file and printer sharing. On the target PC, go to Control Panel → Network and Sharing Center → Advanced sharing settings. Under “Private,” select “Turn on file and printer sharing.” This opens the necessary network ports.
  5. Open Command Prompt as administrator on your computer. Click Start, type cmd, right-click “Command Prompt,” and select “Run as administrator.”
  6. Use the shutdown command. Type the following, replacing COMPUTERNAME with the actual name or IP address of the target PC:
    shutdown /s /m \\COMPUTERNAME /t 30 /c "Shutting down for maintenance"
    Here, /s means shutdown, /m specifies the remote computer, /t 30 gives a 30-second delay, and /c adds a comment shown on the target screen.
  7. Enter credentials if prompted. If your current Windows account doesn’t have admin rights on the target, you’ll be asked for a username and password. Use an account that is an administrator on the target machine.
  8. Wait for the command to execute. The target computer will show a “You are about to be signed out” message and shut down after the delay. To cancel, use shutdown /a on the target PC.

Common Mistakes

  • Using the wrong edition of Windows. The shutdown command with /m only works on Windows Pro, Enterprise, or Education. Home edition doesn’t include the necessary components.
  • Firewall blocking WMI. Even with file sharing on, the Windows Firewall often blocks WMI by default. If you skip step 3, you’ll get “Access denied (5)” or “The RPC server is unavailable.”
  • Typing the computer name incorrectly. The name is case-insensitive but must be exact. Use the IP address instead if you’re unsure.
  • Not running Command Prompt as administrator. Without admin rights, the shutdown command may fail with “Access denied.”
  • Forgetting the delay. If you don’t specify /t, the shutdown happens immediately (default is 0 seconds), which can cause data loss.

Tips

  • Use the restart flag. Replace /s with /r to restart the remote computer instead.
  • Force shutdown if needed. Add /f to force close running apps without warning. Use this only when necessary—it can lose unsaved work.
  • Test with a short delay first. Try /t 60 so you have time to cancel if something goes wrong.
  • Use IP addresses for reliability. If hostname resolution fails, use the IP address: shutdown /s /m \\192.168.1.10.
  • Create a shortcut. Save the command in a .bat file or shortcut for one-click remote shutdown.

Troubleshooting

  • “Access denied (5)” error. This usually means your account isn’t an administrator on the target. Run Command Prompt as admin and use credentials with admin rights on the target. Also verify the target has Remote Registry started.
  • “The RPC server is unavailable.” This indicates a network or firewall issue. Check that both PCs are on the same network, file sharing is on, and WMI is allowed through the firewall. Try pinging the target IP to confirm connectivity.
  • “The network path was not found.” The computer name or IP is wrong, or the target is off. Double-check the name/IP and that the target is powered on.
  • Command hangs or times out. The target may be blocking the connection. Temporarily disable the firewall on the target (if you have admin) to test, then re-enable it. If it works, re-add the WMI exception properly.
  • Target shuts down but you get an error. Sometimes the command succeeds but returns a non-zero exit code. Check if the target actually shut down—if it did, you can ignore the error.

Frequently Asked Questions

Can I shut down a Mac or Linux computer from Windows?

Not with the built-in Windows shutdown command. You’d need SSH or third-party tools. This guide is for Windows-to-Windows only.

Does this work over the internet?

Only if you set up a VPN or port forwarding. Directly exposing the shutdown port to the internet is a security risk and not recommended.

Can I schedule a remote shutdown?

Yes. Use Task Scheduler on the target computer to run the shutdown command at a specific time, or use the shutdown command with /t for a delay.

What if the target computer is in sleep or hibernate mode?

The shutdown command won’t wake it. You need Wake-on-LAN configured to wake it first, then run the shutdown command.

Is there a way to shut down multiple computers at once?

Yes. Create a batch file that runs the shutdown command for each computer, one line per machine. Run it as administrator.

Can I cancel a remote shutdown?

Yes. On the target computer, run shutdown /a as administrator within the delay period. This aborts the shutdown.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →