This article describes a step-by-step process for how to use
the Powercfg.exe file in Microsoft Windows XP to create a power schemes Group
Policy in a domain environment.
By default, users who do not have administrator rights and
permissions cannot change power scheme settings. The power schemes program
changes both per-user and per-machine settings. To change the per-machine
settings, you must have administrator rights and permissions. Failure to set
the per-machine settings prevents the per-user settings from being
committed.
Therefore, if you are a user who does not have
administrator rights and permissions, and you try to use the power schemes
program in Windows XP to change the power scheme settings, you receive the
following error message:
Power Policy Manager unable to
set active policy. Access is denied.
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:
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.
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’s
\Scripts\Logon folder appears.
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:
Click File, click
New, and then click Text Document.
Type PowerConfig.bat, and then
press ENTER.
In the Rename dialog box, click
Yes.
Right-click PowerConfig.bat, and then click
Edit.
If an Open File - Security Warning
dialog box appears, click Run.
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.
Click File, click
Exit, and then click Yes.
Close the Scripts\Logon folder.
In the Logon Properties dialog box, click
Add, click Browse, double-click
PowerConfig.bat, and then click OK two times.
Under Computer Configuration, expand
Windows Settings, expand Security Settings,
and then expand Local Policies.
Click User Rights Assignment, and then
double-click Shut down the system.
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.
Under Computer Configuration, expand
Windows Settings, expand Security Settings,
and then click Registry.
In the Group Policy Object Editor dialog
box, click Action, and then click Add
Key.
In the Selected key box, type the
following entry, and then click OK:
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.
To deny permission to change the settings modified by the logon
batch file, configure user access to the PowerCfg.cpl file. You can deny
permission for the user to open the Power Options extension in Control Panel to
view or to change the power settings. To do this, follow these steps:
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.
Under Computer Configuration, expand
Windows Settings, and then click File
System.
In the Group Policy Object Editor dialog
box, click Action, and then click Add
File.
In the Add a file or folder dialog box,
type %SystemRoot%\system32\powercfg.cpl in the
Folder box, and then click OK.
Click Add, type the user's account name in
the Enter the object names to select box, and then click
OK.
In the Permissions for user name access
permission group, click to select the Deny check box for
Full Control permission, and then click
OK.
In the Security dialog box, click
Yes.
In the Add Object dialog box, click
Configure this key then, then click Propagate
inheritable permissions to all subkeys, and then click
OK.