Logo
CAR REVIEW
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
PREGNANCY
 
 
Windows Server

Windows Server 2008 Server Core : Managing Power Settings with the PowerCfg Utility

12/1/2011 9:03:31 AM
Some people associate the power configuration settings with how long their monitor stays on or how their UPS reacts to a power failure. However, power configuration encompasses a lot more ground that these simple configuration tasks. Even though you can change any power configuration using the graphical interface, the settings appear in disparate locations. Using the PowerCfg utility to manage the power configuration puts everything in one place. Of course, given the enormous job this utility has, it also has a complex command line. This utility uses the following syntax:
POWERCFG /LIST
POWERCFG /QUERY [GUID [SubGUID]] [/NUMERICAL]
POWERCFG /CHANGE GUID settings [/NUMERICAL]
POWERCFG /CHANGENAME GUID name [scheme_description]
POWERCFG /DUPLICATESCHEME GUID DESTINATION_GUID
POWERCFG /DELETE GUID [/NUMERICAL]
POWERCFG /DELETESETTING SUB_GUID SETTING_GUID
POWERCFG /SETACTIVE GUID [/NUMERICAL]
POWERCFG /GETACTIVESCHEME
POWERCFG /SETACVALUEINDEX SCHEME_GUID SUB_GUID SETTING_GUID
SettingIndex
POWERCFG /SETDCVALUEINDEX SCHEME_GUID SUB_GUID SETTING_GUID
SettingIndex
POWERCFG /HIBERNATE {ON|OFF}
POWERCFG /AVAILABLESLEEPSTATES
POWERCFG /DEVICEQUERY queryflags
POWERCFG /DEVICEENABLEWAKE devicename
POWERCFG /DEVICEDISABLEWAKE devicename
POWERCFG /EXPORT GUID [/FILE filename] [/NUMERICAL]
POWERCFG /IMPORT GUID [/FILE filename] [/NUMERICAL]
POWERCFG /LASTWAKE
POWERCFG /ALIASES
POWERCFG /SETSECURITYDESCRIPTOR {GUID | ACTION} SDDL
POWERCFG /GETSECURITYDESCRIPTOR {GUID | ACTION}


The following list describes each of the command line arguments.


/LIST, /L

Lists the names of existing power schemes. You can see the same list in the Power Schemes tab of the Power Options Properties dialog box accessible through the Power Options applet of the Control Panel. This command line switch varies from the /Query command line switch that you can use to see the actual power scheme settings. You can use this command line switch to obtain a list of Globally Unique Identifiers (GUIDs) for the various power configurations as shown in Figure 1. Simply type PowerCfg /L and press Enter to obtain the information. The GUIDs are important in performing other power configuration tasks. Notice that the output places an asterisk (*) next to the currently selected power scheme.

Figure 1. Display the GUIDs for the current power configurations for use with other command line switches.

/QUERY
[GUID [SubGUID]], /Q [GUID [SubGUID]]

Displays the configuration information for a specified power scheme. If you don't supply a power scheme, the utility displays all of the power schemes and their settings. The command line switch supplies the Name, Numerical ID, Turn off monitor (AC), Turn off monitor (DC), Turn off hard disks (AC), Turn off hard disks (DC), System standby (AC), System standby (DC), System hibernates (AC), System hibernates (DC), Processor Throttle (AC), and Processor Throttle (DC) fields as output. The AC fields specify the operating time when the system is on standard line current, while the DC fields specify the operating time when the system is on battery. Supply a GUID or subGUID to obtain particulars about a specific power scheme as shown in Figure 2. In this case, the output shows the High Performance power scheme. To access this scheme, you type PowerCfg /Q 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c and press Enter. However, let's say that you're only interested in the hard drive settings for the High Performance power scheme. In this case, you'd type PowerCfg /Q 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 0012ee47-9041-4b5d-9b77-535fba8b1442 and press Enter. The first GUID is for the High Performance power scheme and the second GUID is for the Hard Drive subGUID.

Figure 2. Use the power scheme GUIDs and subGUIDs to access information about them.

/DELETE
GUID, /D GUID

Deletes the power scheme with the specified GUID.


/SETACTIVE
GUID, /S GUID

Changes the active power scheme to the specified power scheme.


/CHANGE
GUID settings, /X GUID settings

Modifies the settings for the specified power scheme. Changing a setting value to 0 disables that feature. You can change any of the power scheme settings individually using the command line switches that follow.


/monitor-timeout-ac
minutes

Sets the monitor power-down time in minutes when the system is on AC power.


/monitor-timeout-dc
minutes

Sets the monitor power-down time in minutes when the system is on battery.


/disk-timeout-ac
minutes

Sets the hard drive power-down time in minutes when the system is on AC power.


/disk-timeout-dc
minutes

Sets the hard drive power-down time in minutes when the system is on battery.


/standby-timeout-ac
minutes

Sets the system standby time in minutes when the system is on AC power.


/standby-timeout-dc
minutes

Sets the system standby time in minutes when the system is on battery.


/hibernate-timeout-ac
minutes

Sets the system hibernation time in minutes when the system is on AC power.


/hibernate-timeout-dc
minutes

Sets the system hibernation time in minutes when the system is on battery.


/processor-throttle-ac {NONE | CONSTANT | DEGRADE | ADAPTIVE}

Sets the processor-throttling feature when the system is on AC power.


/processor-throttle-dc {NONE | CONSTANT | DEGRADE | ADAPTIVE}

Sets the processor-throttling feature when the system is on battery.


/EXPORT
GUID [
/FILE
filename],
/E
name [
/FILE
filename]

Exports the specified power scheme to a file. A file can contain only one power scheme, so you must always include the power scheme name. The /File command line switch defines the name of the file to use for storage. If you don't include this command line switch, the PowerCfg utility uses a default filename of Scheme.POW.


/IMPORT
GUID [
/FILE
filename],
/I
name [
/FILEs
filename]

Imports the specified power scheme from a file. The file doesn't include a power scheme name, so you can give the power scheme any appropriate name. The /File command line switch defines the name of the file that contains the power scheme. If you don't include this command line switch, the PowerCfg utility uses a default filename of Scheme.POW.


/AVAILABLESLEEPSTATES, /A

Reports the sleep states available on the system. The PowerCfg utility supports four sleep states: S1 is a light sleep, S2 is a deeper sleep, S3 is the deepest sleep, and S4 is hibernation. Each successive sleep state reduces the power requirements of the system or device. However, deeper levels of sleep usually require longer wake-up periods as well. The PowerCfg utility tries to report the reason a system doesn't support a particular sleep state, but usually fails.


/DEVICEQUERY
queryflags

Displays a list of devices that meet the criteria specified by the queryflags argument. You may use more than one query flag to narrow the list of returned devices. The number of devices that support particular power off and wake-up features on a modern system is amazing. However, you usually need to know how the devices will react when setting up a power critical device such as a laptop. For example, it doesn't help to place the devices in an S1 sleep level when most of them don't support that mode. The following list describes the query flags. wake_from_S1_supported Returns all devices that support waking the system from a light sleep.


wake_from_S2_supported

Returns all devices that support waking the system from a deeper sleep.


wake_from_S3_supported

Returns all devices that support waking the system from the deepest sleep state.


wake_from_any

Returns all devices that support waking the system from any sleep mode.


S1_supported

Lists devices that support light sleep states. S2_supported Lists devices that support deeper sleep states.


S3_supported

Lists devices that support the deepest sleep states.


S4_supported

Lists devices that support hibernation.


wake_programmable

Lists devices that a user can configure to wake from a sleep state.


wake_armed

Lists devices that are currently configured to wake from any sleep state.


all_devices

Returns a list of devices present in the system, even if they don't support any sleep mode or hibernation. This list only contains the device name.


all_devices_verbose

Returns a verbose list of devices, even if they don't support any sleep mode or hibernation. This list contains a wealth of information that varies by device. As a minimum, you'll receive the device name, the device identifier, and the sleep, wake, and hibernation modes it supports. Optional information includes whether you can program the device or configure it in some way.


/DEVICEENABLEWAKE
devicename

Enables the specified device to wake the system from a sleep state. The device must provide programmable functionality. You can obtain a list of these devices using the /DEVICEQUERY wake_programmable command line switch.


/DEVICEDISABLEWAKE
devicename

Disables a device from waking the system from a sleep state. You can obtain a list of devices currently set to wake the system using the /DEVICEQUERY wake_armed command line switch.


POWERCFG /CHANGENAME
GUID name [scheme_description]

Modifies the name of the power scheme specified by GUID. Use the PowerCfg /List command to obtain a list of existing GUIDs. The name argument contains the new power scheme name. You can optionally change the power scheme description as well. Make sure you enclose any value that contains spaces in quotes.


POWERCFG /DUPLICATESCHEME
GUID [DESTINATION_GUID]

Creates a new power scheme based on an existing power scheme. If you don't provide a destination GUID, the utility creates one for you automatically. Use the PowerCfg /List command to obtain a list of existing GUIDs. POWERCFG /DELETESETTING SUB_GUID SETTING_GUID Removes the specified power setting. You must provide both the subgroup GUID and the setting GUID as part of this call. Use the PowerCfg /Query command to obtain a list of both subgroup GUIDs and setting GUIDs.


POWERCFG /GETACTIVESCHEME

Displays the name and the GUID of the active power scheme.


POWERCFG /SETACVALUEINDEX
SCHEME_GUID SUB_GUID SETTING_GUID SettingIndex

Sets a value associated with a particular power scheme when the system is powered by AC power. You must provide the power scheme GUID, subgroup GUID, setting GUID, and a setting value (normally a numeric or Boolean value). Use the PowerCfg /List command to obtain a list of power scheme GUIDs. Use the PowerCfg /Query command to obtain a list of both subgroup GUIDs and setting GUIDs.


POWERCFG /SETDCVALUEINDEX
SCHEME_GUID SUB_GUID SETTING_GUID SettingIndex

Performs the same task as the /SETACVALUEINDEX command line switch, except when using DC power.


POWERCFG /LASTWAKE

Reports data about the last time the system returned from the sleep state. If the system hasn't ever returned from the sleep state, the call returns: Wake History Count - 0.


POWERCFG /ALIASES

Displays all power system aliases and their associated GUIDs. These entries aren't associated with the power scheme, subgroup, or setting, but generally refer to state information such as HIBERNATEIDLE or BATLEVELCRIT.


POWERCFG /SETSECURITYDESCRIPTOR
{GUID | ACTION} SDDL

Sets the security descriptor associated with a particular power system component. Provide a GUID when you want to work with a power scheme. Use ActionSetActive, ActionCreate, or ActionDefault when you want to modify a power system action. The SDDL variable must contain a security descriptor. You can learn more about SDDL at http://msdn2.microsoft.com/en-us/library/aa379567.aspx. Use the PowerCfg/GetSecurityDescriptor call to see an example of an SDDL.


POWERCFG /GETSECURITYDESCRIPTOR {GUID | ACTION}

Obtains the security descriptor associated with a particular power system component. Provide a GUID when you want to work with a power scheme. Use ActionSetActive, ActionCreate, or ActionDefault when you want to view a power system action.

Other -----------------
- Windows Server 2003 : Setting Up the Group Policy Software Installation Extension (part 2) - Configuring the Group Policy Software Installation Extension
- Windows Server 2003 : Setting Up the Group Policy Software Installation Extension (part 1) - Creating a Software Distribution Point
- Windows Server 2003 : Using the Group Policy Software Installation Extension & Finding the Right Mix of Services
- Active Directory Domain Services 2008 : Modify a Group Object General Properties & Modify a Group Object Scope
- Active Directory Domain Services 2008 : Add a Group to a Group
- Microsoft Dynamic GP 2010 : Splitting AP across departments automatically with Control Account Management
- Microsoft Dynamic GP 2010 : Getting early warnings with Business Alerts
- SQL Server 2008 R2 : Managing the Optimizer (part 3) - Using Plan Guides & Limiting Query Plan Execution with the Query Governor
- SQL Server 2008 R2 : Managing the Optimizer (part 2) - Forced Parameterization
- SQL Server 2008 R2 : Managing the Optimizer (part 1) - Optimizer Hints
- SQL Server 2008 R2 : Common Query Optimization Problems
- System Center Configuration Manager 2007 : Creating Queries (part 3) - Criterion Type, Operators, and Values
- System Center Configuration Manager 2007 : Creating Queries (part 2) - ConfigMgr Query Builder
- System Center Configuration Manager 2007 : Creating Queries (part 1) - Objects, Classes, and Attributes
- System Center Configuration Manager 2007 : Configuration Manager Queries - Viewing Queries and Query Results
- Microsoft Systems Management Server 2003 : Disaster Recovery - Scheduling Maintenance Tasks
- Microsoft Systems Management Server 2003 : Disaster Recovery - Database Maintenance
- Windows Server 2008 Server Core : Performing a Formatted Printout with Notepad
- Windows Server 2008 Server Core : Obtaining General System Information with the MSInfo32 Utility
- SQL SErver 2008 R2 : Parallel Query Processing
 
 
Most view of day
- Understanding Network Services and Active Directory Domain Controller Placement for Exchange Server 2007 : Defining the Global Catalog
- BizTalk Server 2009 : Building a Resequencing Aggregator
- Monitoring Windows Small Business Server 2011 : Using WSUS Reports
- SQL Server 2012 : Latches and Spinlocks - Latch Types, Latch Modes
- Windows Server 2003 on HP ProLiant Servers : Logical Structure Design (part 1) - Domain and OU Structure
- Collaborating Within an Exchange Environment Using Microsoft Office SharePoint Server 2007 : Exploring End-User Features in MOSS
- Sharepoint 2013 : Integrating Apps for Office with SharePoint (part 1) - Standalone Apps for Office
- Exchange Server 2007 : Leveraging the Capabilities of the Outlook Web Access Client - What’s New in OWA 2007?
- Microsoft Exchange Server 2007 : Understanding the Client Access Server (part 2) - ActiveSync
- SQL Server 2012 : XML and the Relational Database - Querying XML Data Using XQuery (part 1) - Understanding XQuery Expressions and XPath
Top 10
- Windows Phone 8 : Scheduled Tasks - Scheduled Task API Limitations
- Windows Phone 8 : Scheduled Tasks - Updating Tiles Using a Scheduled Task Agent
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 5) - Editing an Existing To-Do Item
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 4) - Creating the To-Do Item Shell Tile, Saving a To-Do Item
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 3) - Debugging Scheduled Tasks
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 2) - TodoService, TodoItemViewModel
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 1) - TodoItem,TodoDataContext
- Windows Phone 8 : Scheduled Tasks - Using Scheduled Tasks
- Windows Phone 8 : Scheduled Tasks - Background Agent Types
- Windows Phone 8 : Windows Phone Toolkit Animated Page Transitions - Reusing the Transition Attached Properties
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro