How can I set power configuration options outside of the Power Options Control Panel applet?
September 2, 2005
A. Windows Server 2003 and Windows XP with Service Pack 2 (SP2) include the Powercfg utility, which lets you set the power configuration options from the command line (which, in turn, you could call from a script). The Microsoft article "How to use Powercfg.exe in Windows Server 2003" offers indepth information about the utility, but its basic usage is as follows:
To view the current power settings, use the /query switch, as the following example and output show:
powercfg /queryField Description Value----------------- -----Name Always OnNumerical ID 3Turn off monitor (AC) After 20 minsTurn off monitor (DC) After 15 minsTurn off hard disks (AC) NeverTurn off hard disks (DC) After 30 minsSystem standby (AC) NeverSystem standby (DC) NeverSystem hibernates (AC) NeverSystem hibernates (DC) NeverProcessor Throttle (AC) Not SupportedProcessor Throttle (DC) Not Supported
You can also query the settings for a specific scheme (place the scheme in quotes if it contains spaces), as this sample command and output show:
powercfg /query "Home/Office Desk"Field Description Value----------------- -----Name Home/Office DeskNumerical ID 0Turn off monitor (AC) After 20 minsTurn off monitor (DC) After 5 minsTurn off hard disks (AC) NeverTurn off hard disks (DC) After 10 minsSystem standby (AC) NeverSystem standby (DC) After 5 minsSystem hibernates (AC) NeverSystem hibernates (DC) After 20 minsProcessor Throttle (AC) Not SupportedProcessor Throttle (DC) Not Supported
You can modify individual settings or change the entire scheme by using the /setactive switch, as this example shows:
powercfg /setactive "Always On"
About the Author
You May Also Like