Managing power settings efficiently is crucial for optimizing both system performance and energy consumption. In this guide, we’ll explore POWERCFG, a powerful command-line tool for Windows that provides extensive control over power configurations. This utility is invaluable for IT professionals and system administrators looking to customize power settings according to specific requirements.
During a research project on optimizing server performance, I stumbled upon POWERCFG. I initially used it to enable core parking in Windows Server 2008 R2 but found the utility’s output challenging to understand. After receiving a reader inquiry about POWERCFG, I delved deeper into its capabilities and discovered a wealth of features worth sharing.
The Basics of POWERCFG
What is POWERCFG?
POWERCFG is a command-line tool designed to manage and configure power settings on Windows systems. It offers a range of commands and parameters, allowing users to tailor power schemes to their needs.
Basic Commands Overview
Listing Power Schemes
To list all power schemes available in the current user’s environment, use the following command:
POWERCFG -LIST
Querying a Power Scheme
To display the contents of a specified power scheme, use:
POWERCFG -QUERY [SCHEME_GUID] [SUB_GUID]
Changing Power Settings
To modify a setting value in the current power scheme, you can use:
POWERCFG -CHANGE -monitor-timeout-ac 5
This example sets the monitor idle timeout to 5 minutes when the system is on AC power.
Advanced POWERCFG Commands
Modifying and Managing Power Schemes
Changing the Power Scheme Name
To modify the name and optionally the description of a power scheme, use:
POWERCFG -CHANGENAME [SCHEME_GUID] [NEW_NAME] [NEW_DESCRIPTION]
Duplicating a Power Scheme
To create a duplicate of an existing power scheme:
POWERCFG -DUPLICATESCHEME [SCHEME_GUID]
Deleting a Power Scheme
To delete a specific power scheme, the command is:
POWERCFG -DELETE [SCHEME_GUID]
Setting Active Power Schemes
Setting a Power Scheme as Active
To make a specified power scheme the active one on the system, use:
POWERCFG -SETACTIVE [SCHEME_GUID]
Retrieving the Active Power Scheme
To find out which power scheme is currently active:
POWERCFG -GETACTIVESCHEME
Configuring Specific Power Settings
Setting AC and DC Power Values
Setting AC Power Values
To set a value for a specified power setting while on AC power:
POWERCFG -SETACVALUEINDEX [SCHEME_GUID] [SUB_GUID] [SETTING_GUID] [INDEX]
Setting DC Power Values
To set a value for a specified power setting while on DC power:
POWERCFG -SETDCVALUEINDEX [SCHEME_GUID] [SUB_GUID] [SETTING_GUID] [INDEX]
Enabling or Disabling Hibernate
To enable or disable the hibernate feature, use:
POWERCFG -HIBERNATE [on|off]
Querying Device Capabilities
Listing Devices with Specific Capabilities
To list devices that meet specific wake criteria:
POWERCFG -DEVICEQUERY [CRITERIA]
Enabling or Disabling Device Wake
To enable a device to wake the system from a sleep state:
POWERCFG -DEVICEENABLEWAKE [DEVICE]
To disable a device from waking the system:
POWERCFG -DEVICEDISABLEWAKE [DEVICE]
Practical Example: Decoding a Power Setting String
A reader asked about the string “bc5038f7-23e0-4960-96da-33abaf5935ec 25.” This string represents a power setting GUID and its configuration.
- Power Setting GUID: bc5038f7-23e0-4960-96da-33abaf5935ec (Maximum processor state)
- Minimum Possible Setting: 0x00000000
- Maximum Possible Setting: 0x00000064
- Possible Settings Increment: 0x00000001
- Possible Settings Units: %
- Current AC Power Setting Index: 0x00000064
- Current DC Power Setting Index: 0x00000064
To set the maximum processor state to 25% when on AC power, ensuring at least one core remains active:
powercfg -setacvalueindex scheme_current sub_processor bc5038f7-23e0-4960-96da-33abaf5935ec 25
Conclusion
POWERCFG offers robust capabilities for managing power settings on Windows systems. It allows users to fine-tune power schemes, enabling better control over system performance and energy consumption. Whether you’re optimizing a server or configuring a personal computer, mastering POWERCFG can significantly enhance your power management skills.