How to use the remote shutdown command in Windows

Posted on May 26, 2008 at 5:31 am

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!

[tags]remote shutdown, remote shutdown command, remote windows shutdown, remote windows xp shutdown, network remote shutdown, remote computer shutdown[/tags]

» Filed Under Computer Tips

Related Posts

Comments

41 Responses to “How to use the remote shutdown command in Windows”

  1. Hiensen said on :

    does not work, ive tried the -s and replaced it with the /s nothing….i can do it locally..in other words i can do it off my machine…but not remotely,

    All the computers are setup on the same network, i know all the names and Ip’s even their MAC ID.

    ive created a batch file…named it like… computer1.bat changed..still nothing..

    im running WINDOWS HOME and the others are winxp pro,
    which doesnt matter, cause ill use a XP PRO on each other, they still dont work. i used the GUI version the cmd\shutdown -i and added the computer through there, still cant do it.

    any thoughts.. besides not using XPHOME or windows.


  2. HAROLD said on :

    Na sua matéria ::Como usar o comando shutdown remoto no Windows:: verifiquei que o nome real do computador é obrigatório. Ok. Existe algum comando para fazer isso via IP. No caso me refiro ao uso de algum equipamento ligado a rede sem autorização do osupervisor. Nesse caso não há como saber o nome, porem o IP o DNS pode acusar.
    Abraços
    Harold


  3. edson said on :

    hola amigos tengo un problema
    que cuando hago el shutdown para apagar las pc locales ,todo normalazo ,configuro la maquina que deseo apagar en herramientas administrativas/seguridad locallocal/asigancion de derechos/forzar apagado/agrego un usuario.
    todo normal cuando lo pruebo funciona bien mediante el cuadro de dialogo de shutdown-i
    pero elproblema es que cuando apago la maquina y la prendo y quiero probrar otra vez ,todo se borra
    como en el principio ¿porque?
    me podrian ayudar por favor


  4. elyova said on :

    no pues esta chido ojala y tu puedas tener mas sobre este tema porke casi nadie lo maneja osea yo me mate la cavesa buscando ke eran esoso simbolos de (-M-s-t-c-r yy 60 y todos los demas) y porfin encontre esta pagina gracias


  5. elyova said on :

    pues eso ke dise el vato es muy interesante pero todo eso es un virus bueno eso disen ke se te apaga la compu tu namas pon en http://www.youtube.com esto:::

    como crear un virus en acsesos directos

    y ya te sale todo esto pues sige los sigientes pasos

    1° crea un acseso directo y despues te sale un cuadro y pon lo sigiente

    shutdown -s -t 60 -c “y pones algun comentario”

    y despues pones ASEPTAR y te va asalir otro cuadro y le pones

    Internet Explorer y ya esta listo

    y luego con el boton secundario le apretas propiedades y dodne dise cambiar icono

    y le pones el de internet explorer y ya esta listo


  6. Fabio said on :

    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

    Fábio

    msn: visualmidia@andranet.com.br


  7. Gowtham said on :

    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
    m.r.gowthamkumar@gmail.com


  8. John said on :

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


  9. mario said on :

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


  10. kano said on :

    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


  11. sandeep said on :

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


  12. Upin said on :

    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.


  13. gerald said on :

    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.


  14. Ismael said on :

    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


  15. Daniel said on :

    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?


  16. Abhay said on :

    Amazing article. Wonderful.

    Thanks,
    Abhay


  17. Farrakh said on :

    Hi,

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

    Thanks


  18. George Cuartero said on :

    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.


  19. Pankaj said on :

    Hi.
    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


  20. dolphin guest house said on :

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


  21. Manohar Rao said on :

    This is very useful and easy to access through GUI mode

    Thanks


  22. hrum said on :

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

    http://abbyte.com


  23. abdul saleem said on :

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


  24. koman90 said on :

    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.


  25. harry said on :

    shutdown pc inter network
    sample : pc a 172.16.202.10
    pc b 172.16.200.20
    pc c 172.16.0.7
    How ro shutdown pc b and c from a…?
    please tellme…
    thanks


  26. bhesler said on :

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


  27. bhesler said on :

    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?


  28. Ismael said on :

    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.


  29. bhesler said on :

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


  30. Ismael said on :

    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”


  31. Sandeep said on :

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


  32. Ismael said on :

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


  33. arun kumar said on :

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


  34. Isabelle said on :

    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.


  35. Emascate said on :

    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!


  36. Muthu said on :

    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?


  37. Thomas said on :

    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


  38. Adrylan said on :

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


  39. Raju said on :

    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


  40. Mobi said on :

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


    Pingbacks
  1. Free advanced network IP and port scanner security tool Says:

    [...] support remote shutdown of PCs and [...]

Please post your comments/suggestions!