Create a Group Policy object to change power scheme settings

To create a Group Policy object to change the power scheme settings, follow these steps:

  1. On the domain controller, copy the Powercfg.exe file to the NETLOGON share.
    • By default, the Powercfg.exe file is located in the %systemroot%\System32 folder on a Windows 2003-based computer.
    • By default, the NETLOGON shared folder is located at%systemroot%\Sysvol\Sysvol\Domain_DNS_name\Scripts on a Windows Server 2003-based computer.
  2. Click Start, click Run, type dsa.msc, and then click OK. This starts the Active Directory Users and Computers snap-in.
  3. In the Active Directory Users and Computers dialog box, right-click the domain container, and then click Properties.
  4. On the Group Policy tab, click New.
  5. Type Power Configuration Policy, and then press ENTER.
  6. Click Edit.
  7. Under User Configuration, expand Windows Settings, and then click Scripts.
  8. In the right pane, double-click Logon, and then click Show Files. The user’s \Scripts\Logon folder appears.
  9. In the user’s Scripts\Logon folder, create a new batch file that sets the power scheme settings on the user’s computer. To do this, follow these steps:
    1. Click File, click New, and then click Text Document.
    2. Type PowerConfig.bat, and then press ENTER.
    3. In the Rename dialog box, click Yes.
    4. Right-click PowerConfig.bat, and then click Edit.
    5. If an Open File – Security Warning dialog box appears, click Run.
    6. Type the following commands in the batch file:
       @echo off net use x: \\domain_DNS_name\netlogon x: powercfg.exe /change "always on" /monitor-timeout-ac 20 powercfg.exe /SETACTIVE "always on" c: net use x: /delete 

      Note The domain_DNS_name term that is used in the batch file is a placeholder for the DNS name of the domain controller.

    7. Click File, click Exit, and then click Yes.
  10. Close the Scripts\Logon folder.
  11. In the Logon Properties dialog box, click Add, click Browse, double-click PowerConfig.bat, and then click OK two times.
  12. Under Computer Configuration, expand Windows Settings, expand Security Settings, and then expand Local Policies.
  13. Click User Rights Assignment, and then double-click Shut down the system.
  14. In the Shut down the system Properties dialog box, click Add User or Group, type the user’s domain name and account name in the User and group names box, and then click OK two times.
  15. Under Computer Configuration, expand Windows Settings, expand Security Settings, and then clickRegistry.
  16. In the Group Policy Object Editor dialog box, click Action, and then click Add Key.
  17. In the Selected key box, type the following entry, and then click OK:

    MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg

  18. Click Add, type the user’s account name in the Enter the object names to select box, and then clickOK two times.
  19. In the Add Object dialog box, click Configure this key then, click Propagate inheritable permissions to all subkeys, and then click OK.
  20. In the Group Policy Object Editor, click Action, and then click Add Key.
  21. In the Selected key box, type the following entry, and then click OK:
    USERS\.DEFAULT\Control Panel\PowerCfg
  22. Click Add, type the user’s account name into the Enter the object names to select box, and then clickOK two times.
  23. In the Add Object dialog box, click Configure this key then, click Propagate inheritable permissions to all subkeys, and then click OK.
  24. In the Group Policy Object Editor dialog box, click File, and then click Exit.
  25. In the domain container Properties dialog box, click OK.
  26. In the Active Directory Users and Computers dialog box, click File, and then click Exit.

* power-scheme must be set to “Portable/Laptop”
* plugged in monitor turn off – Never
* on battery monitor turn off – 15 min
* plugged in system standby – Never
* on battery system standby – 25 min
* plugged in hard disks turn off – Never

* on battery hard disks turn off – 45 min

To create script open notepad and type:

REM Set power-scheme to Portable/Laptop
powercfg /setactive “portable/laptop”
REM Set plugged in monitor timeout to Never
powercfg /change “portable/laptop” /monitor-timeout-ac 0

REM Set on battery monitor timeout to 15 minutes
powercfg /change “portable/laptop” /monitor-timeout-dc 15
REM Set plugged in system standby to Never
powercfg /change “portable/laptop” /standby-timeout-ac 0

REM Set on battery system standby to 25 minutes
powercfg /change “portable/laptop” /standby-timeout-dc 25
REM Set plugged in hard disks timeout to Never
powercfg /change “portable/laptop” /disk-timeout-ac 0

REM Set on battery hard disks timeout to 45 minutes
powercfg /change “portable/laptop” /disk-timeout-dc 45

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s