Monday, November 22, 2010

ADM Template to Disable Hibernation on Windows 7 via Group Policy

To disable Hibernation the HibernateEnabled registry key has to be 0 (zero) to the following registry path:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power

Here is the ADM Template:
;------------------------------------------------------------------------------
CLASS MACHINE

CATEGORY !!System
CATEGORY !!PowerManagement
KEYNAME "CurrentControlSet\Control\Power"

POLICY !!Pol_Disable_Hibernation
EXPLAIN !!Explain_Disable_Hibernation

VALUENAME "HibernateEnabled"
VALUEON NUMERIC 0
VALUEOFF NUMERIC 1
END POLICY
END CATEGORY;
END CATEGORY;


[Strings]
System="System"
PowerManagement ="Power Management"

;------------------------------------------------------------------------------
; Options
;------------------------------------------------------------------------------
Options="Options"
Pol_Disable_Hibernation="Disable Hibernation on Windows 7"
Explain_Disable_Hibernation="Disable Hibernation on Windows 7"
;------------------------------------------------------------------------------

Save this text in file with ADM extension and import it to Windows Server 2008 GPO.

After applying this GPO and restarting the target computer, the hiberfil.sys file is deleted and Hibernate is removed from Windows 7 Start Menu.



8 comments:

  1. Hi Tom - I have a mixed 2003/2008 AD and I imported your ADM on my 2008 server, applied it, but it has had no effect on my Windows 7 machines...

    ReplyDelete
    Replies
    1. Change :

      "KEYNAME "CurrentControlSet\Control\Power"

      for

      KEYNAME "SYSTEM\CurrentControlSet\Control\Power"

      Delete
  2. Pls check again did the GPO is properly applied on your OU in AD. I've check it again on my side and it is ok.

    ReplyDelete
  3. I Have windows server 2008 R2 environment and we have several policys that is working in the domain,
    I have successfully created this ADM template and imported it to gpo and "checked" enable but it has no effect to any user!
    Does Anyone have Any ideas

    ReplyDelete
  4. for those who failed to get this to go, is the GPO linked to an OU with USERs or a COMPUTERs in it? as it needs to be an OU with COMPUTER accounts in it

    ReplyDelete
  5. HKLM, then the policy will be located under Computer Configuration\Policies\Administrative Templates
    HKCU, the policy will be located under User Configuration\Administrative Templates

    ReplyDelete
  6. Cannot find Classic Administrative Templates, plz help.

    ReplyDelete
  7. It disabled all of my options.

    Shutdown, hibernate, sleep.

    Kind of funny.

    ReplyDelete