Disable sleep (and hibernation) for all users




I have a number of labs with multiple computers in each lab. I'm currently
reviewing Vista, planning a rollout as soon as it is available to business
users. My question/problem is the sleep and/or hibernation options. I've
been chasing how to completely turn off all of the various methods a user
might put a computer into sleep mode.

Group policy can remove the sleep button, but also removes the shutdown
button in the process.

I can reassign the sleep button to shutdown instead (but with no "are you
sure", I'm guessing people will get button shy).

I can go into power policies and appear to have disabled it, and I can go to
a dos prompt with powerconfig -H OFF.

But even with all of these set, they can still put it to sleep with the side
menu of the lock button off the task bar.

Is there any way (preferably by group policy) to completely disable the
sleep options in all their locations? With lab computers, since windows NT,
I normally run a batch file to reboot all of them after a class or activity,
so that folks that left them logged in are automatically logged out. Going
to each computer is problematic. But if they are in sleep mode, my batches
can't talk to them to trigger the reboot. I need to be able to prevent
anyone from putting a lab computer into sleep mode at all, ever. This is a
real show-stopper for us.


Karen G.


I have been looking into this for a while. Here is what I have so far:

1. You can change the behaviour of the start menu power button from the
default action of "sleep" to "shutdown" in the advanced power settings.

2. To disable hybernation, go to an administrators command prompt and type:
"powercfg /hibernate off". This removes the option in the shutdown menu.

3. I have found no way to remove the sleep option from the shutdown menu


I just found the gp setting to disable sleep:

Computer configuration-->Administrative Templates-->system-->Power
Management-->sleep settings: disable both "allow standby states" and run
gpupdate to have these take affect.

Mark Bourne

Sam said:
I have been looking into this for a while. Here is what I have so far:

2. To disable hybernation, go to an administrators command prompt and type:
"powercfg /hibernate off". This removes the option in the shutdown menu.

Is there some documentation of these kinds of tricks somewhere?

Disk Cleanup provides an option to save space by disabling hibernation,
but no way of re-enabling it. There doesn't seem to be an option to
enable/disable hibernation from the "Power Options" in control panel
either. After reading the above, I tried "powercfg /hibernate on" to
enable hibernation, which worked. It just made me wonder how people are
meant to know about these commands?

Yes - I know I can get the options to "powercfg" by running "powercfg
/?", but that won't tell me about commands for doing other things!

Ronnie Vernon MVP


Go to the following web page. Note the TOC in the left panel. Expand the
Command Reference item and you will see many more pages on this subject
including a complete A-Z list of commands.

Command Reference:

It takes a while to study many of the commands that are referenced there to
learn exactly what they can do. If you find a command that is not in the
reference, then you can use the /? for the command. Click the icon in the
top left corner of the command prompt window and click Edit/Select All and
then press the Enter Key to copy the information to the clipboard. Open
Notepad and Paste it there. Save it with an intuitive name for future

One thing to remember when using the command line is that many of the
commands can make serious changes to the system without any further prompts
before or after you hit the enter key, so this is not something that you
want to use lightly.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question