Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 



JSI Tip 8369. POWERCFG.EXE is a command-line tool that allows an administrator to control the power settings of a Windows XP SP2 system.

RSS
Subscribe to Windows IT Pro | See More Tips Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

When you open a CMD.EXE prompt, on a Windows XP SP2 computer, and type powercfg /?, you receive:
POWERCFG [/LIST | /QUERY [name] | /CREATE name | /DELETE name |
       /SETACTIVE name | /CHANGE name settings |
       /HIBERNATE {ON|OFF} | /EXPORT name [/FILE filename] |
       /IMPORT name [/FILE filename] | /GLOBALPOWERFLAG {ON|OFF} /OPTION flag |
       /BATTERYALARM {LOW|CRITICAL} [settings] |
       /DEVICEQUERY queryflags | /DEVICEENABLEWAKE devicename |
       /DEVICEDISABLEWAKE devicename | /?]

Description:
    This command line tool enables an administrator to control
    the power settings on a system.

Parameter List:
    /LIST, /L       Lists the names of existing power schemes.
    /QUERY, /Q      Displays the configuration of the specified power scheme.
                    If no name is specified, the configuration of the currently
                    active power scheme is displayed.
    /CREATE, /C     Creates a power scheme with the specified name.  The new
                    scheme is created with the properties of the currently
                    active scheme.
    /DELETE, /D     Deletes the power scheme with the specified name.
    /SETACTIVE, /S  Makes the power scheme with the specified name active.
    /CHANGE, /X     Changes settings of the specified power scheme. Additional
                    switches specify the changes as follows:
                        /monitor-timeout-ac 
                        /monitor-timeout-dc 
                        /disk-timeout-ac 
                        /disk-timeout-dc 
                        /standby-timeout-ac 
                        /standby-timeout-dc 
                        /hibernate-timeout-ac 
                        /hibernate-timeout-dc 
                        /processor-throttle-ac 
                        /processor-throttle-dc 
                    AC settings are used when the system is on AC power.
                    DC settings are used when the system is on battery power.
                    Setting a timeout to zero will disable the corresponding
                    timeout feature.  Supported throttle settings are NONE
                    CONSTANT, DEGRADE, and ADAPTIVE.
    /EXPORT, /E     Exports the power scheme with the specified name to a
                    file.  If no filename is specified, the default is
                    SCHEME.POW.  This additional parameter is supported:
                        /FILE 
    /IMPORT, /I     Imports the power scheme from a file under the specified
                    name.  If no filename is specified, the default is
                    SCHEME.POW.  If a scheme with that name already exists, it
                    is replaced with the new one.  This additional parameter
                    is supported:
                        /FILE 
    /HIBERNATE, /H {ON|OFF}  Enables/Disables the hibernate feature.  Hibernate
                    timeout is not supported on all systems.
    /NUMERICAL, /N  Allows the power scheme to be operated upon to be specified
                    using a numerical identifier.  When using this switch, in
                    place of the name of the power scheme on the command line,
                    specify its numerical identifier.  This switch may be used
                    in combination with the /QUERY, /DELETE, /SETACTIVE,
                    /CHANGE, /EXPORT, and /IMPORT commands.
    /GLOBALPOWERFLAG, /G {ON|OFF}  Turns one of the global power flags on/off.
                    Valid flags (to be used after "/OPTION ") are:
                         BATTERYICON:    Turns the battery meter icon in the
                                         system tray on/off.
                         MULTIBATTERY:   Turns on/off multiple battery display
                                         in system Power Meter.
                         RESUMEPASSWORD: Prompt for password on resuming the
                                         system.
                         WAKEONRING:     Turn on/off wake on ring support.
                         VIDEODIM:       Turn on/off support for dimming video
                                         display on battery power.
    /AVAILABLESLEEPSTATES, /A  Reports the sleep states available on the
                    system.  Attempts to report reasons why sleep states are
                    unavailable.
    /BATTERYALARM, /B {LOW|CRITICAL}  Configures the battery alarm.  The
                    following switches can be specified:
                        /activate 
                            Enables or disables the alarm.
                        /level 
                            The alarm will be activated when the power level
                            reaches this percentage.
                        /text 
                            Turns the text notification on or off.
                        /sound 
                            Turns the audible notification on or off.
                        /action 
                            Specifies the action to take when this alarm goes
                            off.  Not all actions are always available.
                        /forceaction 
                            Force stand by or shutdown even if a program stops
                            responding.
                        /program 
                            Specifies a program to run.  schtasks.exe /change
                           may be used to configure the program.
    /DEVICEQUERY  will return a list of devices that meet the
                    criteria specified in .  Possible values
                    for  are:
                    wake_from_S1_supported - return all devices that support
                             waking the system from a light sleep state.
                    wake_from_S2_supported - return all devices that support
                             waking the system from a deeper sleep state.
                    wake_from_S3_supported - return all devices that support
                             waking from the deepest sleep state.
                    wake_from_any - return all devices that support waking
                             from any sleep state.
                    S1_supported - list devices supporting light sleep states.
                    S2_supported - list devices supporting deeper sleep.
                    S3_supported - list devices supporting deepest sleep.
                    S4_supported - list devices supporting system hibernation.
                    wake_programmable - list devices that are user-configurable
                             to wake the system from a sleep state.
                    wake_armed - list devices that are currently configured to
                             wake the system from any sleep state.
                    all_devices - return all devices present in the system.
                    all_devices_verbose - return verbose list of devices.
    /DEVICEENABLEWAKE  enable the device to wake the system from a
                    sleep state.  is a device retrieved using
                    the '/DEVICEQUERY wake_programmable' parameter.
    /DEVICEDISABLEWAKE  disable the device from waking the system
                    from a sleep state.  is a device retrieved
                    using the '/DEVICEQUERY wake_armed' parameter.
    /HELP, /?       Displays information on command-line parameters.

Examples:
    POWERCFG /LIST
    POWERCFG /QUERY scheme
    POWERCFG /QUERY
    POWERCFG /CREATE scheme
    POWERCFG /DELETE scheme
    POWERCFG /SETACTIVE scheme
    POWERCFG /CHANGE scheme /monitor-timeout-dc 15
    POWERCFG /CHANGE scheme /monitor-timeout-dc 0
    POWERCFG /HIBERNATE on
    POWERCFG /EXPORT scheme /file file
    POWERCFG /QUERY number /NUMERICAL
    POWERCFG /GLOBALPOWERFLAG on /OPTION BATTERYICON
    POWERCFG /AVAILABLESLEEPSTATES
    POWERCFG /BATTERYALARM low
    POWERCFG /BATTERYALARM critical /ACTIVATE on /LEVEL 6 /ACTION hibernate
    POWERCFG /DEVICEQUERY wake_armed
    POWERCFG /DEVICEENABLEWAKE "Microsoft USB IntelliMouse Explorer"



End of Article



Reader Comments

You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
Battery Life Issues Almost Certainly Not Windows 7's Fault

While Microsoft is still investigating a notebook battery life issue that was supposedly caused by Windows 7, some interesting trends have emerged. ...

Confirmed: Battery Life Issues Not Windows 7's Fault

Microsoft on Monday issued a lengthy statement about the recent Windows 7 battery controversy, echoing my assessment from earlier in the day, but backing it up with hard, cold evidence. Put simply, Windows 7 is not responsible for any battery life issues ...

Getting your iPhone to Sync with Exchange 2003

Follow these steps to use an iPhone with Exchange. ...


Windows OSs Whitepapers Protecting Microsoft SharePoint

Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

7 Ways To Get More From Your SharePoint Deployment Now

Windows, Unix, Linux Interoperability

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2010 Penton Media, Inc. Terms of Use | Privacy Statement