powercfg (executable name powercfg.exe ) is a command-line utility that is used from an elevated Windows Command Prompt to control all configurable power ...
powercfg
FromWikipedia,thefreeencyclopedia
Jumptonavigation
Jumptosearch
powercfgDeveloper(s)MicrosoftInitialrelease2004;17 yearsago (2004)OperatingsystemMicrosoftWindowsTypeCommandLicenseProprietarycommercialsoftwareWebsitedocs.microsoft.com/en-us/windows-hardware/design/device-experiences/powercfg-command-line-options
powercfg(executablenamepowercfg.exe)isacommand-lineutilitythatisusedfromanelevatedWindowsCommandPrompttocontrolallconfigurablepowersystemsettings,includinghardware-specificconfigurationsthatarenotconfigurablethroughtheControlPanel,onaper-userbasis.ItwasfirstintroducedbyMicrosoftinWindowsXPSP2in2004.[1][2]
Contents
1Usage
1.1Syntax
1.2Parameters
1.3Examples
2Seealso
3References
4Furtherreading
5Externallinks
Usage[edit]
powercfgmustberunfromanelevatedcommandprompt,and,underWindowsXP,itrequiresworkstationAdministratororpoweruserrights.PowerSchemesareconfiguredonaper-userbasis.ThemostcommoncauseofproblemswithpowersavingandhibernationonWindowssystemsisanincompatibledevicedriver.Thiscanbediagnosedbydisablingeachdeviceinturn(withpowercfg/devicedisablewake).Whenactivatingpowersavingacrossalocalareanetwork,itisimportanttoensurethatsoftwareupdates,securitypatchesandantivirusupdatesinparticular,arenotdisrupted.MicrosoftrecommendstoconfigureitsWindowsServerUpdateServicestoinstallupdateswhenworkstationsareavailableandWindowsTaskSchedulercanbesettowakethemachinewhenneeded.
Syntax[edit]
XP
POWERCFG[/LIST|/QUERY[name]|/CREATEname|/DELETEname|/SETACTIVEname|/CHANGEnamesettings|/HIBERNATE{ON|OFF}|/NUMERICALint|/EXPORTname[/FILEfilename]|/IMPORTname[/FILEfilename]|/GLOBALPOWERFLAG{ON|OFF}/OPTIONflag|/BATTERYALARM{LOW|CRITICAL}[settings]|/DEVICEQUERYflagquery|/DEVICEENABLEWAKEdevicename|/DEVICEDISABLEWAKEdevicename|/?]
Vista,Server2008,7
powercfg[/l[ist]][/q[uery][Scheme_GUID][Sub_GUID]]][/xsettingvalue][/changenameGUIDname[scheme_description]][/duplicateschemeGUID[DestinationGUID]][/d[elete]GUID][/deletesettingSub_GUIDSetting_GUID][/s[etactive]Scheme_GUID][/getactivescheme][/setacvalueindexScheme_GUIDSub_GUIDSetting_GUIDSettingIndex][/setdcvalueindexScheme_GUIDSub_GUIDSetting_GUIDSettingIndex][/h[ibernate][on|off]][/a[vailablesleepstates]][/devicequeryquery_flags][/deviceenablewakedevicename][/devicedisablewakedevicename][/importfilename[GUID]][/exportfilename[GUID]][/lastwake][/aliases][/setsecuritydescriptor[GUID|Action]SDDL][/getsecuritydescriptor[GUID|Action]][/requests][/requestsoverrideCaller_typeNameRequest][/energy[/outputfilename][/xml][/durationseconds][/trace[/dfilepath]][/waketimers][/?]
Parameters[edit]
Parameter
Description
OS
XP
Other
/l[ist]
Listsallpowerschemesinthecurrentuser'senvironment.
Yes
Yes
/q[uery][scheme_name](XP)/q[uery][Scheme_GUID][Sub_GUID]
Displaysthecontentsofthespecifiedpowerscheme.
scheme_nameSCHEME_GUID
(Optional)Specifiesthescheme_name/GUIDofthepowerschemetodisplay.GUIDcanbeobtainedbyusingthepowercfg/lcommand.
SUB_GUID
(Optional)SpecifiestheGUIDofthesubgrouptodisplay.RequiresaSCHEME_GUIDtobeprovided.IfneitherSCHEME_GUIDorSUB_GUIDareprovided,thesettingsofthecurrentuser'sactivepowerschemearedisplayed.IfSUB_GUIDisnotspecified,allsettingsinthespecifiedpowerschemearedisplayed.
Yes
Yes
/c[reate]scheme_name
Createsapowerschemewiththespecifiedscheme_name.
Yes
No
/changesettingvalue/xsettingvalue
Modifiesasettingvalueinthecurrentpowerscheme.
setting
Specifiesoneofthefollowingsettings:monitor-timeout-acminutes
monitor-timeout-dcminutes
disk-timeout-acminutes
disk-timeout-dcminutes
standby-timeout-acminutes
standby-timeout-dcminutes
hibernate-timeout-acminutes
hibernate-timeout-dcminutes
processor-throttle-acthrottle
processor-throttle-dcthrottle
value
Specifiesthevalueinminutes.
ACsettingsareusedwhenthesystemisonACpower.DCsettingsonbatterypower.
Settinganyvalueto0willsetthetimeout=Never
throttle=NONE,CONSTANT,DEGRADE,orADAPTIVE.
Yes
Yes
/changenameGUIDPowerSchemeName[scheme_description]
Modifiesthenameofapowerschemeand,optionally,theschemedescription.
Value
Description
GUID
SpecifiestheGUIDofthepowerscheme
name
Specifiesthenameofthepowerscheme.
scheme_description
Describesthepowerscheme.
Ifthedescriptionisomitted,thenonlythenamewillbechanged.
No
Yes
/duplicateschemeGUID[DestinationGUID]
Duplicatesthespecifiedpowerscheme.TheresultingGUIDwhichrepresentsthenewschemewillbedisplayed.
Value
Description
GUID
SpecifiesaschemeGUID.Obtainedbyusingthepowercfg/lcommand.
DestinationGUID
SpecifiestheGUIDwheretheschemewillbecopied.
Ifisomitted,thenanewGUIDwillbecreatedfortheduplicatedscheme.
No
Yes
/d[elete]scheme_name/d[elete]GUID
DeletesthepowerschemewiththespecifiedGUID.
scheme_nameGUID
Specifiesthescheme_name/GUIDofthescheme.GUIDcanbeobtainedbyusingthepowercfg/lcommand.
Yes
Yes
/deletesettingSub_GUIDSetting_GUID
Deletesapowersetting.
Value
Description
Sub_GUID
SpecifiesthesubgroupGUID.
Setting_GUID
SpecifiesthepowersettingGUID.
No
Yes
/s[etactive]scheme_name-s[etactive]Scheme_GUID
Makesthespecifiedpowerschemeactiveonthecomputer.
scheme_nameScheme_GUID
SpecifiestheschemeGUID.
Yes
Yes
/getactivescheme
Retrievesthecurrentlyactivepowerscheme.
No
Yes
/setacvalueindexScheme_GUIDSub_GUIDSetting_GUIDSettingIndex
SetsavalueassociatedwithaspecifiedpowersettingwhilethecomputerispoweredbyACpower.
Value
Description
Scheme_GUID
SpecifiesapowerschemeGUID.Obtainedbyusingthepowercfg/lcommand.
Sub_GUID
SpecifiesasubgroupofpowersettingGUID.Obtainedbyusingthepowercfg/qcommand.
Setting_GUID
SpecifiesanindividualpowersettingGUID.Obtainedbyusingthepowercfg/qcommand.
SettingIndex'
Specifieswhichofthelistofpossiblevaluesthispowersettingwillbesetto.
Usethe/land/qoptionstodiscovertheGUIDs
No
Yes
/setdcvalueindexScheme_GUIDSub_GUIDSetting_GUIDSettingIndex
SetsavalueassociatedwithaspecifiedpowersettingwhilethecomputerispoweredbyDCpower.
Value
Description
Scheme_GUID
SpecifiesapowerschemeGUID.Obtainedbyusingthepowercfg/lcommand.
Sub_GUID
SpecifiesasubgroupofpowersettingGUID.Obtainedbyusingthepowercfg/qcommand.
Setting_GUID
SpecifiesanindividualpowersettingGUID.Obtainedbyusingthepowercfg/qcommand.
SettingIndex
Specifieswhichofthelistofpossiblevaluesthispowersettingwillbesetto.
No
Yes
/h[ibernate][on|off]
Enablesordisablesthehibernatefeature.Hibernatetimeoutisnotsupportedonallcomputers.
Yes
Yes
/n[umerical]
Specifythepowerschemetobeoperateduponwithanumericalidentifier.Thisswitchallowsanumbertobeusedinplaceofthescheme_nameinthefollowingcommands:/QUERY,/DELETE,/SETACTIVE,/CHANGE,/EXPORT,and/IMPORT
Yes
No
/g[lobalpowerflag][on|off]]
Turnoneofthefollowingglobalpowerflagsonoroff:
BatteryIcon
Turnthebatterymetericoninthesystemtrayon/off.
MultiBattery
Turnson/offmultiplebatterydisplayinsystemPowerMeter.
ResumePassword
Promptforpasswordonresumingthesystem.
WakeOnRing
Turnon/offwakeonringsupport.
VideoDim
Turnon/offsupportfordimmingvideodisplayonbatterypower.
Yes
No
/b[atteryalarm][low|critical][settings]
Configurethebatteryalarm.Settings:
/activate[on|off]
Enableordisablethealarm.
/level[percentage(0–100)]
Thealarmwillbeactivatedwhenthepowerlevelreachesthispercentage.
/text[on|off]
Turnsthetextnotificationonoroff.
/sound[on|off]
Turnstheaudiblenotificationonoroff.
/action[none|shutdown|hibernate|standby]
Specifiestheactiontotakewhenthisalarmgoesoff.Notallactionsarealwaysavailable.
/forceaction[on|off]
Forcestandbyorshutdownevenifaprogramstopsresponding.
/program[on|off]
Specifiesaprogramtorun.schtasks.exe/changemaybeusedtoconfiguretheprogram.
Yes
No
/a[vailablesleepstates]
Reportsthesleepstatesavailableonthecomputer.Attemptstoreportreasonswhysleepstatesareunavailable.
Yes
Yes
/devicequery[query_flags]]
Returnsalistofdevicesthatmeetthespecifiedflags:
wake_from_S1_supported
Returnsalldevicesthatsupportwakingthecomputerfromalightsleepstate.
wake_from_S2_supported
Returnsalldevicesthatsupportwakingthecomputerfromadeepersleepstate.
wake_from_S3_supported
Returnsalldevicesthatsupportwakingthecomputerfromthedeepestsleepstate.
wake_from_any
Returnsalldevicesthatsupportwakingthecomputerfromanysleepstate.
S1_supported
Listsdevicessupportinglightsleep.
S2_supported
Listsdevicessupportingdeepersleep.
S3_supported
Listsdevicessupportingdeepestsleep.
S4_supported
Listsdevicessupportinghibernation.
wake_programmable
Listsdevicesthatareuser/configurabletowakethecomputerfromasleepstate.
wake_armed
Listsdevicesthatarecurrentlyconfiguredtowakethecomputerfromanysleepstate.
all_devices
Returnsalldevicespresentinthecomputer.
all_devices_verbose
Returnsaverboselistofdevices.
Yes
Yes
/deviceenablewakedevicename
Enablesthedevicetowakethecomputerfromasleepstate.
devicename
Specifiesadeviceretrievedbyusingthepowercfg/devicequerywake_programmablecommand.
Yes
Yes
/devicedisablewake
Disablesthedevicefromwakingthecomputerfromasleepstate.
devicename
Specifiesadeviceretrievedbyusingthepowercfg/devicequerywake_armedcommand.
Yes
Yes
/importscheme_name[/FILEfilename]-importfilename[GUID]
Importsallpowersettingsfromthespecifiedfile.
filename
Specifiesafullyqualifiedpathtoafilegeneratedbyusingthepowercfg/exportcommand-lineoption.
GUID
(optional)Representsthesettingsloadedintoapowerscheme.Ifnotsupplied,powercfgwillgenerateanduseanewGUID
Yes
Yes
/exportscheme_name[/FILEfilename]-exportfilename[GUID]
Exportsapowerscheme,representedbythespecifiedGUID,tothespecifiedfile.
filename
Specifiesafullyqualifiedpathtoadestinationfile.
GUID
SpecifiesapowerschemeGUID.Obtainedbyusingthe/lcommand-lineoption.
Yes
Yes
/lastwake
Reportsinformationabouttheeventthatwokethecomputerfromthelastsleeptransition.
No
Yes
/aliases
DisplaysallaliasesandtheircorrespondingGUIDs.TheusermayusethesealiasesinplaceofanyGUIDatthecommandprompt
No
Yes
/setsecruitydescriptor[GUID|Action]SDDL
Setsasecuritydescriptorassociatedwithaspecifiedpowersetting,powerscheme,oraction.
GUID
SpecifiesapowerschemeorapowersettingGUID.
Action
Specifiesoneofthefollowingstrings:ActionSetActive,ActionCreate,ActionDefault
SDDL
SpecifiesavalidsecuritydescriptorstringinSDDformat.Usepowercfg/getsecuritydescriptortoseeanexampleSDDLSTRING.
No
Yes
/getsecuritydescriptor[GUID|]
Getsasecuritydescriptorassociatedwithaspecifiedpowersetting,powerscheme,oraction.
GUID
SpecifiesapowerschemeorapowersettingGUID.
Specifiesoneofthefollowingstrings:ActionSetActive,ActionCreate,ActionDefault
No
Yes
/requests
EnumerateapplicationanddriverPowerRequests.Powerrequestspreventthecomputerfromautomaticallypoweringoffthedisplayorenteringalow-powersleepmode.
No
Yes
/requestsoverrideCaller_typeNameRequest
SetsaPowerRequestoverrideforaparticularProcess,Service,orDriver.Ifnoparametersarespecified,thiscommanddisplaysthecurrentlistofPowerRequestOverrides.NOTE:Nodocumentationexiststoremovearequestoverrideentryonceentered,howeverleavingofftherequesttypewilldoso.powercfg-requestsoverrideCaller_typeName(Requestleftblanktoremoveentry)
Value
Description
Caller_type
Specifiesoneofthefollowingcallertypes:PROCESS,SERVICE,DRIVER.Thisisobtainedbycallingthepowercfg/requestscommand.
Name
Specifiesthecallername.Thisisthenamereturnedfromcallingpowercfg/requestscommand.
Request
SpecifiesoneormoreofthefollowingPowerRequestTypes:Display,System,Awaymode*Leaveblanktoremoveanentry.
No
Yes
/energy
Analyzesthesystemforcommonenergy-efficiencyandbatterylifeproblems.The/energycommandshouldbeusedwhenthecomputerisidleandwithnoopenprogramsordocuments.The/energycommandwillgenerateanHTMLreportfileinthecurrentpath.Windows7andcertainWindows10Insiderbuildsonly.
Value
Description
/outputfilename
SpecifiesthepathandfilenametostoretheenergyreportHTMLfile(default="energy-report.html").
/xml
FormatsthereportfileasXML.
/trace
Recordssystembehavioranddoesnotperformanalysis.Tracefileswillbegeneratedinthecurrentpathunlessthe/dparameterisspecified.
/dfilepath
Specifiesthedirectorytostoretracedata.Mayonlybeusedwiththe/traceparameter.
/duration
Specifiesthenumberofsecondstoobservesystembehavior.Defaultis60seconds
No
7only
/waketimers
Enumeratestheactivewaketimers.Ifenabled,theexpirationofawaketimerwakesthesystemfromsleepandhibernatestates.
No
Yes
/help/?
DisplaysHelpatthecommandprompt.
Yes
Yes
PowerschemeGUIDs
TheuseofGUIDsavoidsanyproblemswithinternationalisationwhenapplyingPowerSavingtonon-EnglishversionsofWindows.Thethreebuilt-inpowerschemeshavethealiaseslistedbelow,whichcanbeusedinsteadoftheGUIDs:
SCHEME_MAX=Powersaver(Maxpowersaving)
SCHEME_BALANCED=Balanced(Typical)
SCHEME_MIN=Highperformance(Minpowersaving)
TheotherGUIDshavealiasesaswell.
Examples[edit]
Listsallpowerschemespowercfg/l
ListallAliasespowercfg-aliases
Retrievethecurrentlyactivepowerschemepowercfg-getactivescheme
SettheMonitoranddisctimeoutsforthecurrentPowersaverschemepowercfg-Change-monitor-timeout-ac20
powercfg-Change-disk-timeout-ac30
Enablethemousetowakefromsleeppowercfg-deviceEnableWake"MicrosoftUSBIntelliMouseExplorer"
Setthe'Powersaver'schemepowercfg-SETACTIVESCHEME_MAX
CreateaCustomPowerschemeandsetitasactiveSet_Custom_Power=B1234567-SS64-SS64-SS64-F00000111AAA
powercfg-DUPLICATESCHEMESCHEME_MAX%_Custom_Power%
powercfg-CHANGENAME%_Custom_Power%"SS64PowerScheme"
powercfg-SETACTIVE%_Custom_Power%
Disablethesleepbutton(fortheuserscurrentpowerscheme)For/f"tokens=2delims=:("%%Gin('powercfg-getActiveScheme')do(
powercfg-setAcValueIndex%%Gsub_buttonssButtonAction0
powercfg-setActive%%G
)
Disablethesleepbutton(forallavailablepowerschemes)For/f"skip=2tokens=2,4delims=:()"%%Gin('powercfg-list')do(
powercfg-setAcValueIndex%%Gsub_buttonssButtonAction0
if"%%H"=="*"powercfg-setActive%%G
)
Seealso[edit]
ListofControlPanelapplets(Windows)#Standardapplets
References[edit]
^"PowerCFG(WindowsXPSP2/2003)".SS64.com.Archivedfromtheoriginalon2017-03-04.
^"PowerCFG(Vista/Windows7/Server2008)".SS64.com.
Furtherreading[edit]
JohnPaulMueller(2007).WindowsAdministrationattheCommandLineforWindowsVista,Windows2003,WindowsXP,andWindows2000.JohnWiley&Sons.ISBN 978-0470165799.
Externallinks[edit]
Wikibookshasabookonthetopicof:GuidetoWindowsCommands
"Powercfgcommand-lineoptions".Microsoft.27October2017.
"HowtousePowercfg.exetocreateaGroupPolicyobjectforpowerschemesinWindowsXP".Microsoft.12April2012.Archivedfromtheoriginalon2013-06-21.
vteWindowscommand-lineprogramsandshellbuiltins
COMMAND.COM
CommandPrompt
WindowsPowerShell
RecoveryConsole
Filesystemnavigation
cd(chdir)
dir
popd
pushd
tree
Filemanagement
attrib
cacls
cipher
compact
copy
del(erase)
deltree
icacls
mkdir(md)
mklink
move
openfiles
recover
ren(rename)
replace
rmdir(rd)
robocopy
takeown
xcopy
Archiving
expand
extrac32
extract
makecab
pax
tar
Diskmanagement
chkdsk
convert
defrag
diskcomp
diskcopy
diskpart
diskraid
diskshadow
drvspace
fdisk
format
fsutil
label
manage-bde
refsutil
subst
scandisk
sys
vol
vssadmin
Processes
at
exit
kill
powercfg
runas
sc
schtasks
shutdown
start
taskkill
tasklist
Registry
assoc
ftype
reg
regini
regsvr32
Userenvironment
chcp
cmdkey
date
graftabl
mode
path
set
setver
setx
time
title
ver
where
whoami
Filecontents
comp
edit
edlin
fc
find
findstr
print
type
Scripting
choice
clip
cscript
doskey
echo
for
forfiles
goto
if
more
pause
prompt
rem
timeout
Networking
arp
BITSAdmin
cURL
getmac
hostname
ipconfig
nbtstat
net
netsh
netstat
nslookup
PathPing
ping
rpcping
route
scp
setspn
sftp
ssh
ssh-add
ssh-agent
ssh-keygen
ssh-keyscan
tracert
winrm
winrs
Maintenanceandcare
auditpol
dispdiag
driverquery
eventcreate
eventtriggers
logman
mofcomp
msiexec
ntbackup
pnpunattend
pnputil
REAgentC
relog
sfc
sxstrace
systeminfo
tracerpt
typeperf
w32tm
WBAdmin
wecutil
wevtutil
winmgmt
winsat
wmic
Bootmanagement
bcdedit
bootcfg
bootsect
fixboot
fixmbr
Softwaredevelopment
debug
exe2bin
QBasic
Miscellaneous
break
cls
dism
dpath
gpresult
gpupdate
help
MSCDEX
pentnt
tpmtool
tpmvscmgr
wsl
ListofDOScommands
Environmentvariables
WindowsSupportTools
Retrievedfrom"https://en.wikipedia.org/w/index.php?title=Powercfg&oldid=1046548032"
Categories:Windowscommands
Navigationmenu
Personaltools
NotloggedinTalkContributionsCreateaccountLogin
Namespaces
ArticleTalk
Variants
expanded
collapsed
Views
ReadEditViewhistory
More
expanded
collapsed
Search
Navigation
MainpageContentsCurrenteventsRandomarticleAboutWikipediaContactusDonate
Contribute
HelpLearntoeditCommunityportalRecentchangesUploadfile
Tools
WhatlinkshereRelatedchangesUploadfileSpecialpagesPermanentlinkPageinformationCitethispageWikidataitem
Print/export
DownloadasPDFPrintableversion
Languages
Addlinks