How to Use Powercfg.exe to create GPO in Windows Server 2003

Sharing is caring!


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%SysvolSysvolDomain_DNS_nameScripts on a Windows Server 2003-based computer.

  • Click Start, click Run, type dsa.msc, and then click OK. This starts the Active Directory Users and Computers snap-in.

  • In the Active Directory Users and Computers dialog box, right-click the domain container, and then click Properties.

  • On the Group Policy tab, click New.

  • Type Power Configuration Policy, and then press ENTER.

  • Click Edit.

  • Under User Configuration, expand Windows Settings, and then click Scripts.

  • In the right pane, double-click Logon, and then click Show Files. The user’sScriptsLogon folder appears.

  • In the user’s ScriptsLogon 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:

    g.       @echo off

    h.      net use x: \domain_DNS_namenetlogon

    i.         x:

    j.        powercfg.exe /change “always on” /monitor-timeout-ac 20

    k.       powercfg.exe /SETACTIVE “always on”

    l.         c:

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

    n.                  Click File, click Exit, and then click Yes.

    1. Close the ScriptsLogon folder.

    2. In the Logon Properties dialog box, click Add, click Browse, double-click PowerConfig.bat, and then click OK two times.

    3. Under Computer Configuration, expand Windows Settings, expand Security Settings, and then expand Local Policies.

    4. Click User Rights Assignment, and then double-click Shut down the system.

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

    6. Under Computer Configuration, expand Windows Settings, expand Security Settings, and then click Registry.

    7. In the Group Policy Object Editor dialog box, click Action, and then click Add Key.

    8. In the Selected key box, type the following entry, and then click OK:

    MACHINESOFTWAREMicrosoftWindowsCurrentVersionControls FolderPowerCfg

    1. Click Add, type the user’s account name in the Enter the object names to selectbox, and then click OK two times.

    2. In the Add Object dialog box, click Configure this key then, click Propagate inheritable permissions to all subkeys, and then click OK.

    3. In the Group Policy Object Editor, click Action, and then click Add Key.

    4. In the Selected key box, type the following entry, and then click OK:

      USERS.DEFAULTControl PanelPowerCfg

    5. Click Add, type the user’s account name into the Enter the object names to selectbox, and then click OK two times.

    6. In the Add Object dialog box, click Configure this key then, click Propagate inheritable permissions to all subkeys, and then click OK.

    7. In the Group Policy Object Editor dialog box, click File, and then click Exit.

    8. In the domain container Properties dialog box, click OK.

    9. In the Active Directory Users and Computers dialog box, click File, and then clickExit.

    Note The user must have the write permission for the following registry subkeys:

    • HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionControls FolderPowerCfg

    • HKEY_ USERS.DEFAULTControl PanelPowerCfg

    Note The first time that the user logs on to the user’s computer, the policy will fail because the other rights and permissions have not taken effect. The second time that the user logs on to the computer, the policy is applied, and the user has permission to change the power scheme settings.

    Leave a Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.