Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My server is on an APC UPS via a USB cable. When the power goes out, I have 10 to 15 minutes to shut everything down gracefully. This is easy for the server but I also have a personal PC on the UPS as well. Chances are good it will be in a state of hibernation when the power goes out.

Using a VBScript or batch file that I can run from the server, how can I:

  1. Wake the Windows XP PC out of hibernation
  2. Log on
  3. Shut it down (I can use the built in shutdown exe for this)
share|improve this question

1 Answer 1

up vote 4 down vote accepted

You can do this with Wake on LAN functionality (WoL). You can read about how to set it up for XP here. This is all assuming your hardware BIOS/MOBO/NIC support WoL functionality, however most relatively modern machines do.

Sending the magic packet will wake the PC from hibernation and then you can use the shutdown command from your server to remotely shutdown the PC. You can do this all from VBScript. You can ping the PC to see if its up, before you send the shutdown command. FYI, you might have to test this out, as just because the NIC is up, doesnt mean the machine is ready to accept a shutdown command. You might have to wait a minute of two after the interface is responding before you send the commmand.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.