How to Use the Remote Shutdown Command in Windows

This article will show you how to use the remote shutdown command tool in Windows to remotely shut down, restart, or logoff a local or networked computer. This can be very useful sometimes if you have multiple computers at home or on your network that you want to quickly shutdown or restart.

You can perform a remote shutdown from the command prompt using the shutdown command and it’s associated switches, from the remote shutdown dialog box, or from a batch file. I’ll try to go through all three in this guide.

Remote Shutdown Overview

Firstly, in order to remotely shutdown a computer on your network, you’ll need to make sure you have Administrative access to that computer. If you’re on a home network, the best way to do this is to make sure all computers are in the same workgroup and that they all have at least one Administrator account with the same user name and password.

You can also have different Administrator account names across computers, but then you’ll need to make sure you add the Administrator account of one computer to the account list on the other computers. You’ll also need to know all the names of the other computers on the network. You can do that by going to Control Panel and then clicking on System. Then click on the Computer Name tab.

computer name

Remote shutdown is useful for managing multiple computers at once and especially useful for helpdesk technicians when they have to fix remote computers.

Remote shutdown via Command Prompt

The shutdown command is most flexible when using it from the command prompt because you can add a bunch of switches to it, which allow you to customize the behavior. Go to Start, then Run, and type in CMD. In the black command window, type in shutdown /? to see the list of switches.

shutdown command

You have to use at least one switch in order for the command to do anything. Basically you would type in shutdown -X -Y -Z where X, Y, Z are letters in the list above.

Here are a couple of the most command switches and what actions they peform:

-l: Logs off the computer

-s: Shuts down the computer

-r: Restarts the computer

-m \\computername: remote shutdown of a computer

-f: Forces programs to close immediately

So for remotely shutting down another machine on your network, you would type into the command prompt the following commands:

shutdown –m \\computername –r –f

This above command will restart the computer named computername and force all programs that are still running to die.

shutdown –m \\computername –r –f –c “The computer will restart, please save all work.” –t 60

This command will restart the computer named computername, force all programs that are running to die, show a message to the user, and countdown 60 seconds before it restarts.

Remote Shutdown via Shutdown Dialog

If you don’t like all those switches, etc, or using the command prompt, then you can bring up the shutdown dialog box. You can open the dialog window by clicking Start, click Run, type CMD and typing shutdown -i and in the blank DOS window.

shutdown i

A window similar to the one below will appear:

remote shutdown dialog

Click the Add or Browse button to add computers to the list. You can then run the commands on the entire batch of computers. If you click Add, you’ll need to enter in the network name of the computer in the format \\computername. You can even add your own computer to test it out and make sure it works.

computer name[6]

Of course, you need to know the actual computer name, which I mentioned how you can figure out above. You’ll also need Administrative access. You can determine this by going to My Computer and typing \\computername into the address bar and seeing if you can get access without having to be prompted for a password.

compute name my

So add as many computers to the list as you like and then set your options. You can shutdown, restart, or logoff. You can also display a warning for however many seconds you like. You can type in a comment at the bottom which will be displayed to users. That’s it!

Remote Shutdown via Batch File

Finally, you can create a batch file so that you can do all of this by just clicking on a file! Or you can even schedule the batch file to be run at specific intervals using Windows Scheduler.

Just go to Notepad and type in the commands you would have typed into the command prompt:

shutdown –m \\computername1 –r
shutdown –m \\computername2 –r
shutdown –m \\computername3 –r

This will restart three computers on my home network. You would of course replace computername1 with the actual names of your computers. Then simple save the file with a .BAT file extension. You can put as many commands into the batch file as you like, so feel free to experiment!

I’ve written an extensive post on how to use batch files in Windows, so read that if you are not familiar with batch files. Enjoy!

More posts from the Computer Tips Category

How to Capture, Save, Record or Download Streaming Audio for Free


OTT Explains – What is the Hosts File in Windows and How Can You Use It?

hard drive label

How to Check the RPM of Your Hard Drive?

How to Add Subtitles to AVI Video – A Tutorial

Popular Posts This Month

ps2 ports

Troubleshoot Keyboard and Mouse Not Working in Windows

  1. Fabio says:

    Ola amigo, vc criou um post justamnete que estou estou pecisando, mas naum consegui fazer funcionar o comando, sera que podria me dar uma forcinha, seguinte, tenho como servidor um Windows 2000 Server e as estações são todos Windows XP, num total de 15 Maquinas ok!, as maquinas começam com o seguinte nomes, Micro-01 Micro-02 e assim por diante, ficaria muito agradecido se pudesse me dar uma forcinha sobre isso viu.

    Desde ja agradeço por sua atenção



  2. Gowtham says:

    Hi I want to clarify one thing

    If you are login as a guest or any other limited account user in a particular client in a network. If you want to shutdown the system which is login as a Administrator. Then how will you do this?

    If any one have some idea means please share with me. My email ID is given below

  3. John says:

    Hello! Is there another way that we can remotely shutdown the computer without administrative access.. is that possible? tnx

  4. mario says:

    Please let me know how I can restart my computer from across the Internet?

  5. kano says:

    This won't work at my school, as you add the computers as you say above, and it says the other system does not support the remote shutdown :/

    Any help?

    If admin rights are needed, i can get those quite easily :p

  6. sandeep says:

    when i type the whole command to shut down the other pc on my network it shows "Access is denied."

  7. Upin says:

    I tried to shutdown another pc through my pc in the same network. (LAN Network) My account is a member of administrator just like the pc which i want to remotely shutdown. i've tried to do this using shutdown remote dialog box (run cmd > shutdown -i). But, it can't work. Message appears was 'Acces is denied'. How to solve this problem. Of course my account ID and password is different with the ID and password to the pc which i wanted to shutdown it remotely.

  8. gerald says:

    Here's how I got it to work.

    1) go to the Windows Firewall setting and make sure there is a check by File and Printer sharing.

    2) On any open window, go to Tools –> Folder Options; go to the View tab, then scroll to the bottom of that window and turn OFF 'use simple file sharing'.

    By doing this, and you being an admin, you can take advantage of the hidden share. At this point, you should be able to connect to the other computers on your network and be able to shut them down remotely.

    Hope this helps.

  9. Ismael says:

    I have tried this way and it worked :

    Remotly shutdown a computer for time = 55 seconds :

    shutdown -r -m \computername -t 55

    and you can abort the remote computer to shutdown by running this command

    shutdown -a -m \computername -t 55

    These commands work better on a network with a domain controller

    Thank you

  10. Daniel says:

    When I do this it says "Access is denied." How do I get around this?? I am on a wireless network and I do just fine up until that point. There is a firewall on the computer I'm trying to do it to so how could I get around that?

  11. Abhay says:

    Amazing article. Wonderful.



  12. Farrakh says:


    This works fine, if you are getting "access denied", you need to make sure you have the Administrator password to prevent this error.


  13. George Cuartero says:

    Just an additional info for the remote shutdown command script. It is mainly used to be run on a Server. while you are logged in as an Administrator or a user that has sufficient administrative rights on your LAN or Domain.

    Running on elevated command prompt may work but never tired. One thing for sure remote shutdown needs sufficient rights to succeed.

    Hope this helps.

  14. Pankaj says:


    I tried your command but it is working on local machine and not on remote machine successfully.

    I have two computers on network and both have same workgroup name and user name with administrative previlages. still i got meesage that access is denied for command

    "shutdown -m \computername -r -f"

    what should i do to avoid this

  15. thank you very much, everything work great….was able to remotely shutdown Windows.

  16. Manohar Rao says:

    This is very useful and easy to access through GUI mode


  17. hrum says:

    Hm…I'm using a special program for remote shutdown a group of computers. Network Shutdown Tool – very simple to use.

  18. abdul saleem says:

    When I do this it says “Access is denied.” How do I get around this?

  19. koman90 says:

    This works best if you're in a domain NOT A WORKGROUP! If your ding this in a workgroup ,ensure your usename and password are spelled the same on both computers.

  20. harry says:

    shutdown pc inter network

    sample : pc a

    pc b

    pc c

    How ro shutdown pc b and c from a…?

    please tellme…


  21. bhesler says:

    when i run shutdown -m\computername i get the help screen what am i doing wrong?

  22. bhesler says:

    i run shutdown -i, then I pick the computer I want to shut down and it takes about 10 seconds and I get a responce in the command prompt that says the network path was not found?

  23. Ismael says:

    Hi bhesler, you need to have a space between the -m and \ .

    Here is an example: shutdown -m \computername

    Let me know how it goes.

  24. bhesler says:

    even after putting the space in there it still pulls up the help command

  25. Ismael says:

    Hi bhesler

    ok This is the command that I have used on our network:

    shutdown -m \computername -s -t 3600

    the computer should shutdown after 1 hour. You can also move the -s and place it before -m, it will still work, so you will have :

    shutdown -s -m \computername -t 3600

    You also need admin rights in order for the command to work. I used this command on April fool day on our network, haha you had to see everyone going crazy. Wost of it, I left the building leaving a note that I went to look for help. when I came back 45min later, everyone was saving gigabits of Data on DVDs, hahaha!!! This was my april fool command, the -c means "comment" :

    shutdown -m \computername -a -t 3600 -c "confickerworm.exe has been detected on your network and took over the admin account. Network drives will be formatted. Total loss of data will be inevitable. System shutdown in 1 hour"

  26. Sandeep says:

    Hi, when I type the command to shut down the other pc on my network it shows “Access is denied.”

  27. Ismael says:

    Hi Sandeep

    make sure that you have admin rights on the network if not it is not going to work

  28. arun kumar says:

    When I use the command shutdown -s -m \smart10, Access is denied message comes even if I have full administrative power??

  29. Isabelle says:

    If you're going to remotely shutdown computers, it's best to run it from a server using a Domain Administrator account, otherwise you will get Access is Denied errors. My 2 cents.

  30. Emascate says:

    To remotely access the computer you want to restart , do the following at the computer: Control Panel > Administrative Tools > Local Security Policy> Local Policies > User Rights Assignment. Double click "Shut Down the System" and click Add User or Group. Type "Everyone" without quotes click OK. The same procedure must be done in "Force Shutdown from a Remote System". Reboot. Now shutdown works!

  31. Muthu says:

    Hi, I have connected my remote machine through VPN, due to some reason its disconnected often and then I used to request somebody to restart. I'm getting 'Access is denied' message when using shutdown -r -m \remotemachine name. but in my local machine I loged on the user which have the administrator privileges.

    Is there anyway to do this?

  32. Thomas says:

    For simple computer networks (no domain) three things will help getting the networked computer to shutdown remotely. From an “Admin” command prompt type gpedit.msc. Look under Local Computer Config; computer config; Windows Setting; User Rights;—- check to see that Users can shut down the system (this is for local shutdown), next check Force shutdown from a remote system, has the “User” that you want to be able to shut the computer down remotely. (this account of course needs to be on both computers and have the same name and password–duh).

    Next back at cmd type regedt32 and find HKLM SYSTEM CURRENTCONTROLSET CONTROL LSA then the name key for forceguest and set to 0. Normally the administrator can do remote commands, but you can enalbe anybody to do this. Also do this to ControlSet### and a reboot may also hep. Of course, perform a group update… gpudate /force

  33. Adrylan says:

    Great post! Is there any way to find out which computer shut down your computer remotely?

  34. Raju says:

    I want to know how I can shut down a remote computer using DOS and without the administrator privilege ? i am working on a client side

  35. Mobi says:

    It gave me an error that "no network path found"…..can someone help?????

  36. sauryanjan says:

    i get error msg “access denied” when i try to shut down pc’s conneted through lan. tell me how to take the administrator plivilages and log into the remote pc to shut it down.
    mail at-

  37. jlibrary says:

    Hi. What about with windows 7? What settings do I need to preset on Windows 7 to be able to remotely shutdown? I am using an XP machine to shutdown 4 XP computers & 6 Windows 7 computers. The XPs shutdow, but I haven't got the 7s to shutdown yet. Any thoughts?


  38. Danny says:

    Try this tool to shutdown, restart PCs. It works within domain and workgroups.

  39. Shari says:

    This information was very helpful for me in managing a remote server. I needed to reboot it and so I modified a few commands and it worked. Thanks.

  40. Lesa says:

    I used this and it worked great thanks.

  41. Ankit says:

    Hi I'm a system admin and this is really useful for me as I monitor user PCs on the network and have to shut down them occassionally…..Thanks

  42. kakadu says:

    if you know some user on remote machine you can first open connection and then execute remote shutdown

    net use \machine /USER:
    shutdown -s -f -m \machine

  43. Ramon says:

    DId everything you said above, but always get the Access Denied error message when trying to connect.

  44. Mex says:

    Yes this works if the user does not have a password, but it doesn't if there is a password! Why!

  45. pete says:

    How do I "add the Administrator account of one computer to the account list on the other computers"

  46. Slivery says:

    To those who have problem with remote shutdown, make sure to completely satisfy the requirements:

    1. The remote computer to be shut down (i.e. the target computer) is NOT running any of these versions of Windows: Windows XP Home, Windows XP Starter Edition, Windows Vista Starter, Windows Vista Home Basic, Windows Vista Home Premium, Windows 7 Starter, Windows 7 Home Basic, Windows 7 Home Premium.

    2. If the target computer is running any of the above operating systems, you need to resort to a third party network management tool.

    3. File and Printer Sharing must be enabled on both ends. Check Windows Firewall (or whatever firewall you have running) settings and network properties for relevant NIC.

    If you're curious as to why Windows variant mentioned above cannot be shut down remotely, the answer is simple: They're intended to be used by computer illiterates who barely know anything about network management and security concepts.

  47. Arobaz says:

    How about shuting down from the Internet? Is it possible? and how can we do it? with a known computer or with a computer we don't have access? Do we only need IP? or trojan, and some illegal things? Thank you for the information, ure tips's useful for me :)

  48. Slivery says:


    You can shutdown a remote computer over the Internet, but you will have to connect to the target computer through VPN of some sort. Private (LAN) IPs are not routable over public network (Internet). Secondly, you can block ports 137, 138, 139, and 1900 from and to the Internet to prevent such intrusion. Unbinding the File and Printer Sharing service from the NIC that's connected to modem also helps to secure your computer.

  49. likasum says:

    Hey ich hab nicht ganz verstanden wie ich den anderen PC zum Administrator mache wäre nett wenn ihr mir das noch mal erklärt danke =)

  50. Zumbito says:


    I've had some problems with the *.bat-file

    It isn't working problerly. Can you tell me how I run cmd?

    NB: I'm using Windows 7

  51. Timothy says:

    Thanks for your great article!!

    I am writing a batch script that will be restarting 25 network machines on the network. After a successful restart the event should be logged on to a log file same as if the restart was not successfull. Am having problems using errolevel since it is alway returning 0 whether restart is successful or not. Please explain to me how you can use if sateents to check whether the shutdown command actually restartd the pc or not

  52. Corry says:

    uhm this is what i do…..

    I open up run
    type in cmd
    in their i type in shutdown -I
    then I click add computer
    then i type in //(insert ip adress here)
    and shut it down

  53. Timothy says:

    This is the script

    rem @echo off

    echo > C:restarted_servers.log

    shutdown -r -f -t 00 -m \pc

    if %errorlevel% GEQ 1 goto ONE

    if %errorlevel% LEQ 0 goto ZERO

    goto END


    echo Restarting mgtfin02 was successful at %date% %time% >> C:restarted_servers.log

    goto END


    echo Restarting mgtfin02 failed at %date% %time% >> C:restarted_servers.log


    Whether the pc is restarted or not the errorlevel value is always 0. What else can i use to check if the restart was successfull apart form the errolevel?


  54. vikram says:

    Hi all, I am getting the error of Access is denied, I am creates the same users & having same password in two systems. these users are having administrative rights. but the problem is still persist. If you have the answer, please contact to me!

  55. govind says:

    hi friends, i tried to remote shutdown a pc on a workgroup, but i getting error msg access is denied, and i don't know about the administrator account, plz help me out of this problem. this is my email

  56. Andi says:

    Well, useful description of shutdown command. But to make multi-host automatic shutdown and WOL we use Remote Shutdown tool from EMCO:

    It has great features and has reasonble pricing.

  57. William Stevens says:

    Turn on File and Printer sharing exception in the Windows Firewall on the target computers. This will allow the command to be able to reach the computer if you have the firewall turned on.

  58. willmac38 says:

    Well I used the command shutdown -s -m \computername -t 55 and it says access denied but I have an account on that computer and it had admin rights. I'm a second yr networking student and this cmd and give me more trouble than anything. its my stepson's pc and sometimes he hogs my bandwidth and I want to shut him down. matter of fact i have remote desktop admin rights so I can log onto the machine so I should be able to shut it down. anyone got any tips I've tried everything.

  59. ronaloo says:

    well i tried this out at a lab in my college.. shutdown a few computers and people were totally pissed off! haha! gr8 shit!

    now i am thinking of writing a program in c++ which will shutdown an range of ips on a network… so all i'll have to do is just find the subnet range and shit all over'em


    for the people who are such dummies: ever heard of search engine

    and if u have the genuine enthusiasm, u'll find info an anything

    not everything can be spoonfed to you

  60. ishan says:

    really nice Windows article…thanx guys!!

  61. MS Retards says:

    Wow thanks M$,

    As usual you've done a top job of explaining how to bypass your own feeble security. How about explaining exactly how I PREVENT all the tools in my class from shutting down the lab pc's when I'm the only one trying to learn something!

    Windows 7 Pro appears to be immune to such "ordinary" tricks as gpedit to prevent shutdown, disabling remote access/remote admin in the firewall and so on. After ensuring that my sys. admin had disabled all of these options, it seems that a simple "shutdown -i" is all that is needed to remotely shutdown the pc's of students that actually want to do some work.

    Bravo Microfuckwits, your joke OS is as insecure and open to expolitation as ever!

  62. Moxie says:


    Really interesting post! After trying this on my home network I find that I can shutdown any pc froma ny other pc. The one problem I have with this is as follows:

    Maybe I have a pc running improtant tasks and it also has shared folders (so it has NETBOIS shares) and I dont really want my flatmates shutting it down whenever they feel like it: So How do I stop "shutdown -i" from working on my 24/7 pc?

    I've tried disabling shutdown via gpedit and in the registry, and i've blocked remote registry and remote windows admin. via thwe windows firewall. No luck. When ever they feel like it, my flatmates can shutdown my pc's using "shutdown -i" and they don't even need to supply a password!!

  63. M Bratton says:

    Tried doing this every way possible. I have admin rights on the network and still get access is denied (5). I have tried using the command syntax, shutdown -i, everything… nothing works. Not sure what the problem is but would love for someone to help me figure it out.

  64. JAY says:


    I wanted to know if I could shut down my sons PC even if I’m 20 miles away as he is busy playing games on computer instead of doing work.

Leave a Reply