# alternative to psshutdown



## where (Mar 11, 2010)

My goal is to have a script check for a condition in a log file, if it exists hibernate twelve computers. Then at a set time have a scheduled task wake the computer up.

If I manually hibernate one of the machines and have a scheduled task with the 'wake the computer to run this task' box checked, it will indeed wake up at the scheduled time. I planned on using psshutdown to remotely hibernate the win2k machines. Psshutdown does hibernate the machine, however the scheduled task will no longer wake it up.

Searching lead me to part of the windows API, SetSuspendState. Which has me thinking that perhaps psshutdown is setting the DisableWakeEvent to true.

Does anyone know a way to hibernate a computer remotely? Or, alternatively a way to force the DisableWakeEvent to remain false?

Any help would be greatly appreciated! Thanks!


----------



## TheOutcaste (Mar 19, 2009)

I have no idea if this will work, don't have a Win 2k system handy that supports hibernation, but should be easy to test.
Download the *shutdown.exe* utility for Win2K from here
I don't know if this has the same issue as psshutdown.
Create a scheduled task set to run once on each Win2k box that runs a batch file that puts them into hibernation.
Make sure the task is not set to be deleted if not scheduled, and let it run by schedule once. You can then run it remotely on demand.
Just need one line in the batch file:*[path]shutdown -h -t 0*
Then when the condition is met, just execute the scheduled task remotely so the machines each hibernate themselves.
*schtasks /s \\RemotePC /run /TN TaskName*
You may have to specify a username and password, but I've had better luck just making sure each PC has an admin account with the same name and password as the one on the system I access them from.

Or have the task check for the presence of a file every few minutes; if present, delete the file and hibernate.
Then when the condition is met, you just create that file on each system, and they will hibernate the next time they run the task.


----------



## Squashman (Apr 14, 2005)

Give this a try.
http://users.telenet.be/jbosman/applications.html


----------

