/build/static/layout/Breadcrumb_cap_w.png

Supporting Windows Question


Power Management Options

06/29/2012 10449 views

hello all-

I was wondering if any one knows how to write a script for power options to disable  turn off monitor hard disk standby never and disable hibernate for winxp and win7, i just realize that most of my patching issues i am having is because the power options settings. any help would be greatly appreciated.

 

thanks

 

0 Comments   [ + ] Show comments

Comments



Community Chosen Answer

4

Here are the registry changes the policy makes

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\3C0BC021-C8A8-4E07-A973-6B14CBCB2B7E]
"ACSettingIndex"=dword:00000e10

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\6738E2C4-E8A5-4A42-B16A-E040E769756E]
"ACSettingIndex"=dword:ffffffff

Answered 06/29/2012 by: SMal.tmcc
Red Belt

  • the 00000e10 is 3600 seconds

All Answers

3

We do power management via GPO's

Answered 06/29/2012 by: SMal.tmcc
Red Belt

  • If you run the changes as a script the user can always change them again, with a GPO they will stay how you set them.
  • do you mind sharing the GPO for you power management with me.

    thanks
2

I'd recommend Smal's GPO option over a script, but if you decide to use a script, this link describes the command you would use along with its parameters.

http://technet.microsoft.com/en-us/library/cc748940%28v=ws.10%29

Answered 06/29/2012 by: Ben M
9th Degree Black Belt

2

For WinXP, I use a POWERCFG script.  Just run it at the command prompt for options.  Here's one I use for my workstations that should do what you want:

POWERCFG /CREATE XP-WORKSTATION
POWERCFG /HIBERNATE off
POWERCFG /CHANGE XP-WORKSTATION /monitor-timeout-ac 0
POWERCFG /CHANGE XP-WORKSTATION /disk-timeout-ac 0
POWERCFG /CHANGE XP-WORKSTATION /standby-timeout-ac 0
POWERCFG /GLOBALPOWERFLAG off /OPTION RESUMEPASSWORD
POWERCFG /SETACTIVE XP-WORKSTATION
EXIT

And here's one for laptops (never turn off on AC, scale off on battery):

POWERCFG /CREATE XP-LAPTOP
POWERCFG /HIBERNATE on
POWERCFG /CHANGE XP-LAPTOP /monitor-timeout-ac 0
POWERCFG /CHANGE XP-LAPTOP /monitor-timeout-dc 25
POWERCFG /CHANGE XP-LAPTOP /disk-timeout-ac 0
POWERCFG /CHANGE XP-LAPTOP /disk-timeout-dc 30
POWERCFG /CHANGE XP-LAPTOP /standby-timeout-ac 0
POWERCFG /CHANGE XP-LAPTOP /standby-timeout-dc 45
POWERCFG /CHANGE XP-LAPTOP /hibernate-timeout-ac 0
POWERCFG /CHANGE XP-LAPTOP /hibernate-timeout-dc 60
POWERCFG /GLOBALPOWERFLAG on /OPTION BATTERYICON
POWERCFG /GLOBALPOWERFLAG off /OPTION RESUMEPASSWORD
POWERCFG /BATTERYALARM critical /ACTIVATE on /LEVEL 3 /ACTION hibernate
POWERCFG /SETACTIVE XP-LAPTOP
EXIT

For Windows 7, I setup a custom power profile to my liking (everything always on!), ran POWERCFG -GETACTIVESCHME to find the GUID, and then exported it using POWERCFG -EXPORT.  Just run POWERCFG /? from command line and you'll get the exact options to use.  After that, you'll need to create a script (and upload the *.pow config file as a dependency) and run the POWERCFG -IMPORT and POWERCFG -SETACTIVE commands to import the power config file and set it active.

I like GPOs for some things, but labels give *much* for flexibility for targeting specific groups of machines based on characteristics (not OUS) that GPOs lack.

John

Answered 06/29/2012 by: jverbosk
Red Belt


  • Excellent tip, thanks!

    John
1

for windows7 you can use group policy Preferences to set up your own Power Plan to whatever you want set it as a preference.

 

Create A GPO on the same level as your computer accounts (if you dont already have one).
Expand the following GPO
Computer Configuration/Policies/Preferences/Power Option 

 

Create your own power options.

Answered 07/03/2012 by: sivhead
White Belt

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ