Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

To clarify, when I'm talking about 'Sleep' I mean Hybrid Sleep, i.e. save the contents of RAM to the hibernation file and then go in to Standby mode.

I have this working perfectly fine via the start menu, but want to script it in the form of something that can be run by the Task Scheduler. An exe, batch script or Powershell script would work well

I've experimented with PowrProf SetSuspendState and powercfg -h off in scripts with no luck, it always just goes straight into Standby or hibernates and turns off entirely

share|improve this question

I found an article titled Command line hybrid sleep that says you may be able to use the following command:

rundll32 powrprof.dll,SetSuspendState

From the comments there, it sounds like you'll also need make sure Hybrid Sleep mode enabled in the Power Configuration options and perhaps Activate Hybrid Sleep in the BIOS as well, depending on your system.

share|improve this answer
/h hibernates the machine, it doesn't sleep it. – Enigma Feb 4 '13 at 16:58
@Enigma: You're correct. I've updated my answer. – martineau Feb 4 '13 at 21:08
As stated in the question, I've been unable to get this to work via the Task Scheduler – benwh Mar 16 '13 at 18:19
benwh: Yes, I can read. An important point I was trying to make my answer was that in order to get it to work with the Task Scheduler, may require enabling it in a one or two places. – martineau Mar 16 '13 at 19:36
If it wasn't configured correctly elsewhere in the system, why would Hybrid Sleep work correctly when initiating it via Start -> Sleep, or using that command via the run prompt? – benwh Mar 16 '13 at 21:27

Your Answer


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.