Put a Windows computer to sleep remotely (from a Linux box)

5,991

Yes.

You can use the net rpc shutdown -I x.x.x.x -U username%password command from linux (I think - it works under XP).

I had to install my distribution's samba package to get the net command. You'll have to enable remote shutdown on your windows box too. Have a look at how to do it in xp. You might have to add a few parameters if you want to put your win box to sleep instead of shutting down though.

Share:
5,991

Related videos on Youtube

Snark
Author by

Snark

jack of all trades, master of none

Updated on September 17, 2022

Comments

  • Snark
    Snark almost 2 years

    I'd like to have my Linux box (a QNAP TS-210 NAS) send the order to go to sleep (or hibernation) to my main Windows 7 computer.

    As the NAS is running Linux, I can't use psshutdown from SysInternals' PsTools. Is there any Linux equivalent? Or some "magic packet" that can order the Win7 computer to sleep.

    I know I could install a SSH daemon and trigger a shutdown command from the Linux box using ssh, but ideally I do not want to install anything on the Win7 computer.

    I can install Linux software on the NAS, no problem about this. PHP, python and perl are also available on it.

    • Unfundednut
      Unfundednut over 14 years
      While searching for an answer for you I came across this. While not for you someone else might find it helpful online-tech-tips.com/computer-tips/remote-shutdown-command
    • Unfundednut
      Unfundednut over 14 years
      @Snark why not install wine on the nas and use that to run psshutdown?
    • Snark
      Snark over 14 years
      @MrStatic: Thanks for the link. The NAS has an ARM CPU, it cannot run Wine.
  • Pitto
    Pitto about 6 years
    What are the needed parameters to hibernate the Windows machine?