Disable sleep (and hibernation) for all users

Discussion in 'Windows Vista Administration' started by Karen G, Oct 5, 2006.

  1. Karen G

    Karen G Guest

    Gentlefolk,

    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.

    Thanks,

    Karen G.
     
    Karen G, Oct 5, 2006
    #1
    1. Advertisements

  2. Karen G

    Roel Guest

    Yes, I also want this. Otherwise users never log off. And Logon-new
    a.o. is not displayed
     
    Roel, Mar 21, 2007
    #2
    1. Advertisements

  3. Karen G

    Sam Yost Guest

    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
    selection.
     
    Sam Yost, Mar 21, 2007
    #3
  4. Karen G

    Sam Yost Guest

    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.
     
    Sam Yost, Mar 21, 2007
    #4
  5. Karen G

    Mark Bourne Guest

    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!
     
    Mark Bourne, Mar 22, 2007
    #5
  6. Mark

    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:
    http://technet2.microsoft.com/WindowsVista/en/library/69baa34b-d4b3-40ec-bd2f-12d98f7802d51033.mspx

    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
    reference.

    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.
     
    Ronnie Vernon MVP, Mar 23, 2007
    #6
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.