- Joined
- Jul 22, 2005
- Messages
- 8,984
- Thread Author
- #1
The following is an instruction on how to have some semblance of a Power Management group policy in an environment operating under Windows XP and Windows Server 2003. Unfortunately, the Power Management options in XP, as opposed to Vista, are stored in binary files, thereby making it difficult to control Power Options with Group Policy and reduce electrical costs. Fortunately, however, Microsoft released "powercfg.exe", which is a command line tool that will allow you to create a logon script for controlling the power management settings of computers on Active Directory. It is interesting to note that Microsoft has released a lot of command line tools, for example defrag.exe, which would allow a lot of tasks which are automated in Windows Vista to be accomplished using batch scripts in XP.
The logic of power management on legacy systems such as Windows Server 2003\Windows XP is that an older processor draws more power, usually around 80-120 watts on idle. While in standby mode it will be using 10-15 watts.
Here is the code for the batch file / login script. You should store this at \\server\netlogon\power.bat. If you using Windows Server 2003 Small Business Server, you can edit \\server\netlogon\SBS_LOGIN_SCRIPT.bat and have it call \\server\netlogon\power.bat by editing SBS_LOGIN_SCRIPT.bat and adding at the bottom:
For compatibility reasons, you can take a copy of the powercfg.exe binary out of c:\windows\system32\ and copy it to \\server\netlogon\
Here is the code for power.bat:
Ostensibly, what this code does is map\mount "\\server\netlogon" to the X:\ drive on the local system, then it executes the creation of a new Power Scheme called Custom1, it sets monitor timeout to 15 minutes, hard disk timeout to 60 minutes, standby to 3 hours, and hibernation, if available, to 6 hours. It then dismounts/unmaps drive X:
Again, this can be deployed from Windows Server 2003 to lower power consumption costs on idle systems running obsolete software.
If you are using an environment where the Active Directory users are not Administrators on their local machines, but are in fact Limited Accounts, you will have a problem because Windows XP will inherit the Power Options from the Administrator account. To remedy this, you can go into Group Policy on the server, Computer Settings, Registry, and set the following keys to be writable by EVERYONE in Active Directory:
Set "Replace existing permissions on all subkeys with inheritable permissions" for all 3 of these keys.
With the right policies in place, you can lower the total cost of ownership on your network, even if it is going the way of the dinosaur!
As a Scheduled Task:
Youcan apply a scheduled task to standby/hibernate Windows XP computers at a given time by executing this command in the Scheduled Task:
The logic of power management on legacy systems such as Windows Server 2003\Windows XP is that an older processor draws more power, usually around 80-120 watts on idle. While in standby mode it will be using 10-15 watts.
Here is the code for the batch file / login script. You should store this at \\server\netlogon\power.bat. If you using Windows Server 2003 Small Business Server, you can edit \\server\netlogon\SBS_LOGIN_SCRIPT.bat and have it call \\server\netlogon\power.bat by editing SBS_LOGIN_SCRIPT.bat and adding at the bottom:
Code:
\\server\netlogon\power.bat
Here is the code for power.bat:
Code:
REM This bat-file applies Custom1 Power Management Settings
@echo off
net use x: \\server\netlogon
x:
powercfg.exe /CREATE Custom1
powercfg.exe /CHANGE Custom1 /monitor-timeout-ac 15
powercfg.exe /CHANGE Custom1 /monitor-timeout-dc 15
powercfg.exe /CHANGE Custom1 /disk-timeout-ac 60
powercfg.exe /CHANGE Custom1 /disk-timeout-dc 60
powercfg.exe /CHANGE Custom1 /standby-timeout-ac 180
powercfg.exe /CHANGE Custom1 /standby-timeout-dc 180
powercfg.exe /CHANGE Custom1 /hibernate-timeout-ac 360
powercfg.exe /CHANGE Custom1 /hibernate-timeout-dc 360
powercfg.exe /CHANGE Custom1 /processor-throttle-ac ADAPTIVE
powercfg.exe /CHANGE Custom1 /processor-throttle-dc ADAPTIVE
powercfg.exe /SETACTIVE Custom1
c:
net use x: /delete
Again, this can be deployed from Windows Server 2003 to lower power consumption costs on idle systems running obsolete software.
If you are using an environment where the Active Directory users are not Administrators on their local machines, but are in fact Limited Accounts, you will have a problem because Windows XP will inherit the Power Options from the Administrator account. To remedy this, you can go into Group Policy on the server, Computer Settings, Registry, and set the following keys to be writable by EVERYONE in Active Directory:
Code:
MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg
MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power
USERS\.DEFAULT\Control Panel\PowerCfg
With the right policies in place, you can lower the total cost of ownership on your network, even if it is going the way of the dinosaur!
As a Scheduled Task:
Youcan apply a scheduled task to standby/hibernate Windows XP computers at a given time by executing this command in the Scheduled Task:
Code:
rundll32.exe powrprof.dll,SetSuspendState 1 1 0