PowerCfg - Windows CMD - SS64.com (2024)

  • SS64
  • CMD
  • How-to

Control power settings, configure Hibernate/Standby modes.

Syntax powercfg [Options]Options /AvailableSleepStates /A Report the sleep states available on the computer. Will also attempt to report reasons why sleep states are unavailable. /Aliases Display all aliases and their corresponding GUIDs. These can be used in place of a GUID at the command prompt. /batteryreport Generate a report of battery usage. /Change settingvalue /x setting value Modify one of the following settings in the current power scheme: monitor-timeout-ac minutes monitor-timeout-dc minutes disk-timeout-ac minutes disk-timeout-dc minutes standby-timeout-ac minutes standby-timeout-dc minutes hibernate-timeout-ac minutes hibernate-timeout-dc minutes Setting any value to 0 will set the timeout=Never AC settings are used when the system is on AC power. DC settings on battery power. /ChangeName GUID PowerSchemeName [scheme_description] Modify the name of a power scheme and, optionally, the scheme description. /Delete GUID /D GUID Delete the power scheme with the specified GUID. /DeleteSetting Sub_GUID Setting_GUID Delete a power setting. /DeviceQuery query_flags Return a list of devices that meet the specified flags: wake_from_S1_supported – Waking the computer from a light sleep state. wake_from_S2_supported – Waking the computer from a deeper sleep state. wake_from_S3_supported – Waking the computer from the deepest sleep state. wake_from_any – Support waking the computer from any sleep state. S1_supported – Light sleep. S2_supported – Deeper sleep. S3_supported – Deepest sleep. S4_supported – Hibernation. wake_programmable – User-configurable to wake the computer from a sleep state. wake_armed – Currently configured to wake the computer from any sleep state. all_devices – Present in the computer. all_devices_verbose – Verbose list of devices. /DeviceEnableWake devicename Enable the device to wake the computer from a sleep state. /DeviceDisableWake devicename Disable the device from waking the computer from a sleep state. /DuplicateScheme GUID [DestinationGUID] Duplicate a power scheme. The GUID of the new scheme will be displayed. If DestinationGUID is omitted, then a new GUID will be created for the duplicated scheme. /Energy Create energy-report.html in the current directory. /Export filename GUID Export a power scheme, represented by GUID, into filename. A power scheme GUID is returned by running powercfg /list. /GetActiveScheme Retrieve the currently active power scheme. /Hibernate [on|off] /H [on|off] Enable or disable the hibernate feature. This will also turn off Fast Startup (or hybrid sleep) Hibernate timeout is not supported on all computers. /import filename [GUID] Import all power settings from the specified file. filename is the path to a file generated with powercfg /export If no GUID is specified, a new GUID is created. /LastWake Report information about the last event that woke the computer. /L /List List the current user’s power schemes (GUIDs) /Query [Scheme_GUID] [Sub_GUID] /q [Scheme_GUID] [Sub_GUID] Display the contents of a power scheme. /requests Enumerate application and driver Power Requests. /requestsoverride Set a Power Request override for a particular Process, Service, or Driver. /SetActive Scheme_GUID /S Scheme_GUID Make the specified power scheme active on the computer. /SetacValueIndex Scheme_GUID Sub_GUID Setting_GUID SettingIndex Set a value associated with a specified power setting while the computer is powered by AC power. Use the /l and /q options to discover the GUIDs SettingIndex Specifies which value in the list to set, so 3 = 3rd in the list /SetdcValueIndex Scheme_GUID Sub_GUID Setting_GUID SettingIndex Set a value associated with a specified power setting while the computer is powered by DC power. SettingIndex Specifies which value in the list to set, so 3 = 3rd in the list /SetSecurityDescriptor [GUID|Action] SDDL Set a security descriptor associated with a specified power setting, power scheme, or action. Action Is one of: ActionSetActive, ActionCreate, ActionDefault SDDL is a valid security descriptor string in SDD format. Call powercfg /getsecuritydescriptor to see an example SDDL STRING. /GetSecurityDescriptor [GUID|Action] Get a security descriptor associated with a specified power setting, power scheme, or action. Action is one of: ActionSetActive, ActionCreate, ActionDefault /sleepstudy Generates a diagnostic system power transition report. /srumutil Dumps Energy Estimation data from System Resource Usage Monitor (SRUM). /SystemPowerReport [ /output file_name ] [ /xml | /transformxml file_name ] /spr [ /output file_name ] [ /xml | /transformxml file_name ] Generate a report of system power transitions over the last three days on the system, including connected standby power efficiency. Generates an HTML report in the current path. Requires elevation. /SystemSleepDiagnostics [ /output file_name ] [ /xml ] [ /duration days ] Generate a report of intervals when the user was not present over the last three days on the system, and if the system went to sleep. Generates an HTML report in the current path. Requires elevation. /WakeTimers Enumerate the active wake timers. (Typically used to run scheduled tasks) /Help /? Display help

To make changes to power settings, Powercfg must be run from an elevated command prompt.

Powercfg command-line options - full details from docs.Microsoft.com

Reasons you you may wish to disable Hibernation/Fast Start:

  • The hibernation file can take up considerable disc space.
  • Linux users will likely see complications with dual boot and virtualization.
  • Wake-on-LAN may fail to work (or work reliably) when fast startup is enabled.
  • Windows 10 updates might not install properly, due to WOL failing to wake the machine.

These problems are by no means across the board, and are often due to an incompatible device driver, diagnose this by disabling each device in turn (with /DeviceDisableWake)

When activating Power Saving across an organisation, it is important to ensure that software updates (security patches and antivirus) are not disrupted.
WSUS can be configured to install updates when workstations are available and Scheduled Tasks can be set to Wake the machine when needed.

Power scheme GUIDs

The use of GUIDs avoids any problems with internationalisation when applying Power Saving to non-english versions of Windows.

The three most common built-in power schemes:

SCHEME_MAX = Power saver (Max power saving)
SCHEME_BALANCED = Balanced (Typical)
SCHEME_MIN = High performance (Min power saving)

Examples

List all Aliases:

C:\> powercfg /aliases
a1841308-3541-4fab-bc81-f71556f20b4a SCHEME_MAX
8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c SCHEME_MIN
381b4222-f694-41f0-9685-ff5bb260df2e SCHEME_BALANCED
fea3413e-7e05-4911-9a71-700331f1c294 SUB_NONE
238c9fa8-0aad-41ed-83f4-97be242c8f20 SUB_SLEEP
29f6c1db-86da-48c5-9fdb-f2b67b1f44da STANDBYIDLE
9d7815a6-7ee4-497e-8888-515a05f02364 HIBERNATEIDLE
94ac6d29-73ce-41a6-809f-6363ba21b47e HYBRIDSLEEP
d4c1d4c8-d5cc-43d3-b83e-fc51215cb04d REMOTEFILESLEEP
7516b95f-f776-4464-8c53-06167f40cc99 SUB_VIDEO

Retrieve the currently active power scheme:

C:\> Powercfg /getactivescheme

Set the Monitor and disc timeouts for the current Power saver scheme:

C:\> Powercfg /Change -monitor-timeout-ac 20
C:\> Powercfg /Change -disk-timeout-ac 30

Enable the mouse to wake from sleep:

C:\> Powercfg /deviceEnableWake "Microsoft USB IntelliMouse Explorer"

Set the 'Power saver' scheme:

C:\> Powercfg /SETACTIVE SCHEME_MAX

Create a Custom Power scheme and set it as active:

Set _Custom_Power=B1234567-SS64-SS64-SS64-F00000111AAA
Powercfg /DUPLICATESCHEME SCHEME_MAX%_Custom_Power%
Powercfg /CHANGENAME %_Custom_Power% "SS64 Power Scheme "
Powercfg /SETACTIVE %_Custom_Power%

Disable the sleep button (for the users current power scheme):

For /f "tokens=2 delims=:(" %%G in ('powercfg /getActiveScheme') do (
Powercfg /setAcValueIndex %%G SUB_BUTTONS sButtonAction 0
Powercfg /setActive %%G
)

Disable the sleep button (for all available power schemes):

For /f "skip=2 tokens=2,4 delims=:()" %%G in ('powercfg /list') do (
Powercfg /setAcValueIndex %%G SUB_BUTTONS sButtonAction 0
if "%%H" == " *" Powercfg /setActive %%G
)

“The fact that you have to choose between nine different ways of turning off your computer... produces just a little bit of unhappiness every time” ~ Joel on Software

Related commands

powercfg.cpl - Control Panel.
Q915160 - Create a Group Policy object for power schemes.
3rd party Power Management tools - EnergyStar.gov
SCHTASKS - Schedule a command to run at a specific time.

Copyright © 1999-2024 SS64.com
Some rights reserved

PowerCfg - Windows CMD - SS64.com (2024)
Top Articles
Spartanburg County Detention Facility - Annex 1, SC Inmate Search: Roster & Mugshots
Spartanburg County Main Jail - Inmate101
Spasa Parish
Rentals for rent in Maastricht
159R Bus Schedule Pdf
Sallisaw Bin Store
Black Adam Showtimes Near Maya Cinemas Delano
Espn Transfer Portal Basketball
Pollen Levels Richmond
11 Best Sites Like The Chive For Funny Pictures and Memes
Things to do in Wichita Falls on weekends 12-15 September
Craigslist Pets Huntsville Alabama
Paulette Goddard | American Actress, Modern Times, Charlie Chaplin
What's the Difference Between Halal and Haram Meat & Food?
R/Skinwalker
Rugged Gentleman Barber Shop Martinsburg Wv
Jennifer Lenzini Leaving Ktiv
Justified - Streams, Episodenguide und News zur Serie
Epay. Medstarhealth.org
Olde Kegg Bar & Grill Portage Menu
Cubilabras
Half Inning In Which The Home Team Bats Crossword
Amazing Lash Bay Colony
Juego Friv Poki
Dirt Devil Ud70181 Parts Diagram
Truist Bank Open Saturday
Water Leaks in Your Car When It Rains? Common Causes & Fixes
What’s Closing at Disney World? A Complete Guide
Experience the Convenience of Po Box 790010 St Louis Mo
Fungal Symbiote Terraria
modelo julia - PLAYBOARD
Poker News Views Gossip
Abby's Caribbean Cafe
Joanna Gaines Reveals Who Bought the 'Fixer Upper' Lake House and Her Favorite Features of the Milestone Project
Tri-State Dog Racing Results
Navy Qrs Supervisor Answers
Trade Chart Dave Richard
Lincoln Financial Field Section 110
Free Stuff Craigslist Roanoke Va
Stellaris Resolution
Wi Dept Of Regulation & Licensing
Pick N Pull Near Me [Locator Map + Guide + FAQ]
Crystal Westbrooks Nipple
Ice Hockey Dboard
Über 60 Prozent Rabatt auf E-Bikes: Aldi reduziert sämtliche Pedelecs stark im Preis - nur noch für kurze Zeit
Wie blocke ich einen Bot aus Boardman/USA - sellerforum.de
Infinity Pool Showtimes Near Maya Cinemas Bakersfield
Dermpathdiagnostics Com Pay Invoice
How To Use Price Chopper Points At Quiktrip
Maria Butina Bikini
Busted Newspaper Zapata Tx
Latest Posts
Article information

Author: Rev. Leonie Wyman

Last Updated:

Views: 5582

Rating: 4.9 / 5 (59 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Rev. Leonie Wyman

Birthday: 1993-07-01

Address: Suite 763 6272 Lang Bypass, New Xochitlport, VT 72704-3308

Phone: +22014484519944

Job: Banking Officer

Hobby: Sailing, Gaming, Basketball, Calligraphy, Mycology, Astronomy, Juggling

Introduction: My name is Rev. Leonie Wyman, I am a colorful, tasty, splendid, fair, witty, gorgeous, splendid person who loves writing and wants to share my knowledge and understanding with you.