networking - How to shutdown a computer remotely from outside LAN?

05
2014-04
  • Marilyn Manson

    This question already has an answer here:

  • Answers
  • Antony

    To shutdown remote machine

    shutdown -s -f -m \\remotecomputername
    

    To restart remote machine

    shutdown -r -f -m \\remotecomputername
    

    If you make this mistake you have 30 seconds to cancel the Windows shutdown with the -a switch.

    -a Is for abort. This it only works during the time-out period

    shutdown -a
    

  • Related Question

    How to remote shutdown a win XP machine from linux?
  • brice

    How do you remotely shutdown an XP host from a linux machine? I know that you can use

    shutdown /s /f /m \IP_GOES_HERE
    

    From windows, but how would you do that from linux? (wine does not port the shutdown command)


  • Related Answers
  • David Spillett

    Does the psshutdown tool from SysInternals (nor part of MS) work under Wine? Probably not, but might be worth a try.

    Failing that you could install cygwin's OpenSSH port (or some other SSH server service) and use that to login and call Windows' own local shutdown command - this would be a one line command/script.

  • Daniel

    If you create a shortcut link to this from the windows machine you can simply do it that way.

    Put this in the Target text box: C:\WINDOWS\system32\shutdown.exe -s -f -c "Shutdown!" -t 10

    Put this in the Start in text box: C:\Windows\System32

  • qwertyKid

    I used the psshutdown, but had a different method. I had Outlook open on the machine 24/7 and if it received an email from my email account only, with a random set of words in it, the rule would run psshutdown

    you could try this you could even use this mthod to shiut the computer off from a text message! :)

  • brice

    psshutdown doesn't work from wine for some reason.

    however,

    net rpc shutdown -I xxx.xxx.xxx.xxx -U username%password
    

    works if all the proper steps have been taken