Powercfg

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Powercfg

Enables an administrator to control the power settings on a system.

Syntax

powercfg [/list] [/query [Name]] [/createName] [/deleteName] [/setactiveName] [/changeSettings] [/hibernate [{on | off}]] [/exportName [/file FileName]] [/import Name [/file FileName]] [/numerical] [/globalpowerflag {on | off} /option:{batteryicon | multibattery | resumepassword | wakeonring | videodim}] [/availablesleepstates] [/batteryalarm {low | critical}]

Parameters

/list

Lists the names of existing power schemes. You can use the abbreviated version of this command, /l. Use these parameters to display a list of all the available existing power schemes on the computer. The same list is available on the Power Schemes tab of the Power Options tool in Control Panel.

For example, if you use the /list parameter, the following default schemes appear:

  • Home/Office

  • Portable/Laptop

  • Presentation

  • Always On

  • Server Balanced Processor Power and Performance

  • Max Battery

If you have added other schemes to the computer, these schemes appear on the list.

/query [Name]

Displays the configuration of the specified power scheme. If no name is specified, the configuration of the currently active power scheme is displayed. You can use the abbreviated version of this command, /q.

The settings are always displayed in minutes. If you want configure a setting for two hours, enter 120 minutes.

You can use the powercfg /query number /numerical command to query the schemes by number instead of by name. You receive the same output that you do if you query by name. The following list contains the numbers for each scheme:

  • 5: Max Battery

  • 4: Server Balanced Processor and Performance

  • 3: Always On

  • 2: Presentation

  • 1: Portable/Laptop

  • 0: Home/Office

If you add or remove schemes, the numbering may change.

/create Name

Creates the specified power scheme. The new scheme is created with the properties of the currently active scheme. You can use the abbreviated version of this command, /c.

/delete Name

Deletes the specified power scheme. You can use the abbreviated version of this command, /d.

/setactive Name

Activates the specified power scheme. You can use the abbreviated version of this command, /s.

/change Settings

Changes settings of the specified power scheme. You can use the abbreviated version of this command, /x. For Settings, use the following to specify the changes:

Value Description

/monitor-timeout-ac Minutes

Turns the monitor off after the specified number of minutes when the system is operating on AC power. A value of 0 will disable the time-out.

/monitor-timeout-dc Minutes

Turns the monitor off after the specified number of minutes when the system is operating on DC (battery) power. A value of 0 will disable the time-out.

/disk-timeout-ac Minutes

Turns the hard disks off after the specified number of minutes when the system is operating on AC power. A value of 0 will disable the time-out.

/disk-timeout-dc Minutes

Turns the hard disks off after the specified number of minutes when the system is operating on DC (battery) power. A value of 0 will disable the time-out.

/standby-timeout-ac Minutes

Puts the computer in standby mode after the specified number of minutes when the system is operating on AC power. A value of 0 will disable the time-out.

/standby-timeout-dc Minutes

Puts the computer in standby mode after the specified number of minutes when the system is operating on DC (battery) power. A value of 0 will disable the time-out.

/hibernate-timeout-ac Minutes

Saves the contents of the computer's memory to disk and turns off the computer after the specified number of minutes when the system is operating on AC power. A value of 0 will disable the time-out.

/hibernate-timeout-dc Minutes

Saves the contents of the computer's memory to disk and turns off the computer after the specified number of minutes when the system is operating on DC (battery) power. A value of 0 will disable the time-out.

/processor-throttle-ac { none | constant | degrade | adaptive}

Selects the dynamic throttling policy to be used, if your microprocessor supports processor performance state controls, when the system is operating on AC power. The following table lists and describes each dynamic throttling policy option.

  • none - Causes the microprocessor to operate at the highest performance state at all times

  • constant - Causes the microprocessor to operate at the lowest performance state at all times

  • degrade - Causes the microprocessor to operate at the lowest performance state, and further reduces performance by applying stop clock throttling as the system battery drains

    Note

    This option is typically used when the computer is operating on battery power and is therefore seldom used with /processor-throttle-ac.

  • adaptive - Modifies the performance state dynamically based on the demand the system puts on the microprocessor

/processor-throttle-dc { none | constant | degrade | adaptive}

Selects the dynamic throttling policy to be used, if your microprocessor supports processor performance state controls, when the system is operating on DC (battery) power. The desired dynamic throttling policy is selected with one of the four additional switches listed under /processor-throttle-ac.

/hibernate [{on| off}]

Turns the hibernation feature on or off. Hibernation time-out is not supported on all systems that support hibernation. You can use the abbreviated version of this command, /h.

/export Name [/file FileName]

Exports the specified power scheme to a file. You can use the abbreviated version of this command, /e. If no filename is specified, the default is scheme.pow. This parameter supports the /fileFileName parameter.

/import Name [/file FileName]

Imports the power scheme from the specified file. You can use the abbreviated version of this command, /i. If no file name is specified, the default is scheme.pow. If a scheme with that name already exists, it is replaced with the new one. This parameter supports the /fileFileName parameter.

/numerical

Requires you to specify the power scheme using its numeric identifier, rather than its name. Use this switch in combination with the /query, /delete, /setactive, /change, /export, and /import commands. You can use the abbreviated version of this command, /n.

/globalpowerflag {on | off} /option:{batteryicon | multibattery | resumepassword | wakeonring | videodim}

Turns the global power flag features on or off. Use the first switch to indicate whether to turn the feature on or off. You can use the abbreviated version of this command, /g. /option: is mandatory, and is followed by the name of the feature you are turning on or off. The following table lists and describes each option.

Value Description

batteryicon

Enables or disables the battery meter icon in the notification area. When this flag is cleared, the battery meter icon is not displayed

multibattery

Enables or disables multiple battery display in the system Power Meter

resumepassword

Enables or disables the requirement that the user supply a password when the system resumes from standby or hibernate

wakeonring

Enables or disables Wake on Ring support

videodim

Enables or disables support for dimming the video display when the system changes from AC power to DC (battery) power

/availablesleepstates

Reports the sleep states that are available on the system and attempts to report why sleep states are unavailable. You can use the abbreviated version of this command, /a.

/batteryalarm [low | critical]

Displays or configures the specified battery alarm. Using this option without any parameters will display the current settings. You can use the abbreviated version of this command, /b.

The following options can be specified:

  • /activate {on|off} Enables or disables the alarm.

  • /level (0-100) Alarm will be activated when the power level reaches this percentage.

  • /text {on|off} Turns the text notification on or off.

  • /sound {on|off} Turns the audible notification on or off.

  • /action {none|shutdown|hibernate|standby} Specifies the action to take when this alarm goes off. Not all actions are always available.

  • /forceaction {on|off} Force stand by or shutdown even if a program stops responding.

  • /program {on|off} Specifies whether the system will run a program when the alarm goes off. When this option is used, the output will be the task name that can be used with Schtasks.exe /change to configure the program.

/?

Displays help at the command prompt.

Examples

Following are examples of how you can use the powercfg command:

powercfg /list

powercfg /query scheme

powercfg /change scheme /monitor-timeout-dc 15

powercfg /change scheme /monitor-timeout-dc 0

powercfg /hibernate on

powercfg /globalpowerflag on /option: batteryicon

Formatting legend

Format Meaning

Italic

Information that the user must supply

Bold

Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output

See Also

Concepts

Command-line reference A-Z
Command shell overview