Skip to content

Instantly share code, notes, and snippets.

@raspi
Last active November 2, 2024 06:13
Show Gist options
  • Save raspi/203aef3694e34fefebf772c78c37ec2c to your computer and use it in GitHub Desktop.
Save raspi/203aef3694e34fefebf772c78c37ec2c to your computer and use it in GitHub Desktop.
Enable all advanced power settings in Windows.
# List all possible power config GUIDs in Windows
# Run: this-script.ps1 | Out-File powercfg.ps1
# Then edit and run powercfg.ps1
# (c) Pekka "raspi" Järvinen 2017
$powerSettingTable = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSetting
$powerSettingInSubgroubTable = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSettingInSubgroup
Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSettingCapabilities | ForEach-Object {
$tmp = $_.ManagedElement
$tmp = $tmp.Remove(0, $tmp.LastIndexOf('{') + 1)
$tmp = $tmp.Remove($tmp.LastIndexOf('}'))
$guid = $tmp
$s = ($powerSettingInSubgroubTable | Where-Object PartComponent -Match "$guid")
if (!$s) {
return
}
$tmp = $s.GroupComponent
$tmp = $tmp.Remove(0, $tmp.LastIndexOf('{') + 1)
$tmp = $tmp.Remove($tmp.LastIndexOf('}'))
$groupguid = $tmp
$s = ($powerSettingTable | Where-Object InstanceID -Match "$guid")
$descr = [string]::Format("# {0}", $s.ElementName)
$runcfg = [string]::Format("powercfg -attributes {0} {1} -ATTRIB_HIDE", $groupguid, $guid)
Write-Output $descr
Write-Output $runcfg
Write-Output ""
}
@raspi
Copy link
Author

raspi commented Jun 10, 2017

Example output:

# Reserve battery level
powercfg -attributes e73a048d-bf27-4f12-9731-8b2076e8891f f3c5027d-cd16-4930-aa6b-90db844a8f00 -ATTRIB_HIDE

# Maximum processor frequency
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 75b0ae3f-bce0-45a7-8c89-c9611c25e100 -ATTRIB_HIDE

# Maximum processor frequency for Processor Power Efficiency Class 1
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 75b0ae3f-bce0-45a7-8c89-c9611c25e101 -ATTRIB_HIDE

# Processor idle threshold scaling
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 6c2993b0-8f48-481f-bcc6-00dd2742aa06 -ATTRIB_HIDE

# Low battery action
powercfg -attributes e73a048d-bf27-4f12-9731-8b2076e8891f d8742dcb-3e6a-4b3c-b3fe-374623cdcf06 -ATTRIB_HIDE

# NVMe Idle Timeout
powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 d639518a-e56d-4345-8af2-b9f32fb26109 -ATTRIB_HIDE

# USB 3 Link Power Mangement
powercfg -attributes 2a737441-1930-4402-8d77-b2bebba308a3 d4e98f31-5ffe-4ce1-be31-1b38b384c009 -ATTRIB_HIDE

# Low battery level
powercfg -attributes e73a048d-bf27-4f12-9731-8b2076e8891f 8183ba9a-e910-48da-8769-14ae6dc1170a -ATTRIB_HIDE

# NVMe Power State Transition Latency Tolerance
powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 fc95af4d-40e7-4b6d-835a-56d131dbc80e -ATTRIB_HIDE

# Processor performance increase policy
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 465e1f50-b610-473a-ab58-00d1077dc418 -ATTRIB_HIDE

# Processor performance increase policy for Processor Power Efficiency Class 1
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 465e1f50-b610-473a-ab58-00d1077dc419 -ATTRIB_HIDE

# Processor idle demote threshold
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 4b92d758-5a24-4851-a470-815d78aee119 -ATTRIB_HIDE

# Power Saving Mode
powercfg -attributes 19cbb8fa-5279-450e-9fac-8a3d5fedd0c1 12bbebe6-58d6-4636-95bb-3217ef867c1a -ATTRIB_HIDE

# Standby Reset Percentage
powercfg -attributes 8619b916-e004-4dd8-9b66-dae86f806698 49cb11a5-56e2-4afb-9d38-3df47872e21b -ATTRIB_HIDE

# Allow display required policy
powercfg -attributes 7516b95f-f776-4464-8c53-06167f40cc99 a9ceb8da-cd46-44fb-a98b-02af69de4623 -ATTRIB_HIDE

# Unparked time trigger
powercfg -attributes 48672f38-7a9a-4bb2-8bf8-3d85be19de4e d6ba4903-386f-4c2c-8adb-5c21b3328d25 -ATTRIB_HIDE

# USB selective suspend setting
powercfg -attributes 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 -ATTRIB_HIDE

# Processor Idle Resiliency Timer Resolution
powercfg -attributes 2e601130-5351-4d9d-8e04-252966bad054 c42b79aa-aa3a-484b-a98f-2cf32aa90a28 -ATTRIB_HIDE

# Processor performance core parking max cores
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 ea062031-0e34-4ff1-9b6d-eb1059334028 -ATTRIB_HIDE

# Processor performance core parking max cores for Processor Power Efficiency Class 1
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 ea062031-0e34-4ff1-9b6d-eb1059334029 -ATTRIB_HIDE

# Processor performance core parking decrease policy
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 71021b41-c749-4d21-be74-a00f335d582b -ATTRIB_HIDE

# Processor performance core parking parked performance state
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 447235c7-6a8d-4cc0-8e24-9eaf70b96e2b -ATTRIB_HIDE

# Processor performance core parking parked performance state for Processor Power Efficiency Class 1
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 447235c7-6a8d-4cc0-8e24-9eaf70b96e2c -ATTRIB_HIDE

# Processor performance core parking increase time
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 2ddd5a84-5a71-437e-912a-db0b8c788732 -ATTRIB_HIDE

# IO coalescing timeout
powercfg -attributes 2e601130-5351-4d9d-8e04-252966bad054 c36f0eb4-2988-4a70-8eee-0884fc2c2433 -ATTRIB_HIDE

# Lid close action
powercfg -attributes 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 -ATTRIB_HIDE

# Processor performance autonomous mode
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 8baa4a8a-14c6-4451-8e8b-14bdbd197537 -ATTRIB_HIDE

# Standby Reserve Grace Period
powercfg -attributes 8619b916-e004-4dd8-9b66-dae86f806698 c763ee92-71e8-4127-84eb-f6ed043a3e3d -ATTRIB_HIDE

# Standby Budget Grace Period
powercfg -attributes 8619b916-e004-4dd8-9b66-dae86f806698 60c07fe1-0556-45cf-9903-d56e32210242 -ATTRIB_HIDE

# Deep Sleep Enabled/Disabled
powercfg -attributes 2e601130-5351-4d9d-8e04-252966bad054 d502f7ee-1dc7-4efd-a55d-f04b6f5c0545 -ATTRIB_HIDE

# Critical battery action
powercfg -attributes e73a048d-bf27-4f12-9731-8b2076e8891f 637ea02f-bbcb-4015-8e2c-a1c7b9c0b546 -ATTRIB_HIDE

# Video playback quality bias.
powercfg -attributes 9596fb26-9850-41fd-ac3e-f7c3c00afd4b 10778347-1370-4ee0-8bbd-33bdacaade49 -ATTRIB_HIDE

# Minimum processor state
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 893dee8e-2bef-41e0-89c6-b55d0929964c -ATTRIB_HIDE

# Minimum processor state for Processor Power Efficiency Class 1
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 893dee8e-2bef-41e0-89c6-b55d0929964d -ATTRIB_HIDE

# Allow sleep with remote opens
powercfg -attributes 238c9fa8-0aad-41ed-83f4-97be242c8f20 d4c1d4c8-d5cc-43d3-b83e-fc51215cb04d -ATTRIB_HIDE

# AHCI Link Power Management - Adaptive
powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 dab60367-53fe-4fbc-825e-521d069d2456 -ATTRIB_HIDE

# Low battery notification
powercfg -attributes e73a048d-bf27-4f12-9731-8b2076e8891f bcded951-187b-4d05-bccc-f7e51960c258 -ATTRIB_HIDE

# Processor performance boost policy
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 45bcc044-d885-43e2-8605-ee0ec6e96b59 -ATTRIB_HIDE

# Adaptive display
powercfg -attributes 7516b95f-f776-4464-8c53-06167f40cc99 90959d22-d6a1-49b9-af93-bce885ad335b -ATTRIB_HIDE

# Processor performance increase threshold
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 06cadf0e-64ed-448a-8927-ce7bf90eb35d -ATTRIB_HIDE

# Processor performance core parking concurrency headroom threshold
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 f735a673-2066-4f80-a0c5-ddee0cf1bf5d -ATTRIB_HIDE

# Processor performance increase threshold for Processor Power Efficiency Class 1
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 06cadf0e-64ed-448a-8927-ce7bf90eb35e -ATTRIB_HIDE

# Processor performance history count
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 7d24baa7-0b84-480f-840c-1b0743c00f5f -ATTRIB_HIDE

# Processor performance history count for Processor Power Efficiency Class 1
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 7d24baa7-0b84-480f-840c-1b0743c00f60 -ATTRIB_HIDE

# AHCI Link Power Management - HIPM/DIPM
powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 0b2d69d7-a2a1-449c-9680-f91c70521c60 -ATTRIB_HIDE

# Processor energy performance preference policy
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 36687f9e-e3a5-4dbf-b1dc-15eb381c6863 -ATTRIB_HIDE

# Hard disk burst ignore time
powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 80e3c60e-bb94-4ad8-bbe0-0d3195efc663 -ATTRIB_HIDE

# Hibernate after
powercfg -attributes 238c9fa8-0aad-41ed-83f4-97be242c8f20 9d7815a6-7ee4-497e-8888-515a05f02364 -ATTRIB_HIDE

# Critical battery level
powercfg -attributes e73a048d-bf27-4f12-9731-8b2076e8891f 9a66d8d7-4ff7-4ef9-b5a2-5a326ca2a469 -ATTRIB_HIDE

# Processor idle time check
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 c4581c31-89ab-4597-8e2b-9c9cab440e6b -ATTRIB_HIDE

# Processor performance level decrease threshold for Processor Power Efficiency Class 1 processor count decrease
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 f8861c27-95e7-475c-865b-13c0cb3f9d6b -ATTRIB_HIDE

# Allow wake timers
powercfg -attributes 238c9fa8-0aad-41ed-83f4-97be242c8f20 bd3b718a-0680-4d9d-8ab2-e1d2b4ac806d -ATTRIB_HIDE

# Turn off hard disk after
powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 6738e2c4-e8a5-4a42-b16a-e040e769756e -ATTRIB_HIDE

# Latency sensitivity hint processor performance
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 619b7505-003b-4e82-b7a6-4dd29c300971 -ATTRIB_HIDE

# Latency sensitivity hint processor performance for Processor Power Efficiency Class 1
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 619b7505-003b-4e82-b7a6-4dd29c300972 -ATTRIB_HIDE

# Setting IOC on all TDs
powercfg -attributes 2a737441-1930-4402-8d77-b2bebba308a3 498c044a-201b-4631-a522-5c744ed4e678 -ATTRIB_HIDE

# Processor idle promote threshold
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 7b224883-b3cc-4d79-819f-8374152cbe7c -ATTRIB_HIDE

# Turn off display after
powercfg -attributes 7516b95f-f776-4464-8c53-06167f40cc99 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e -ATTRIB_HIDE

# Allow hybrid sleep
powercfg -attributes 238c9fa8-0aad-41ed-83f4-97be242c8f20 94ac6d29-73ce-41a6-809f-6363ba21b47e -ATTRIB_HIDE

# System cooling policy
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 94d3a615-a899-4ac5-ae2b-e4d8f634367f -ATTRIB_HIDE

# When sharing media
powercfg -attributes 9596fb26-9850-41fd-ac3e-f7c3c00afd4b 03680956-93bc-4294-bba6-4e0f09bb717f -ATTRIB_HIDE

# A floor performance for Processor Power Efficiency Class 0 when there are Processor Power Efficiency Class 1 processors unparked
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 fddc842b-8364-4edc-94cf-c17f60de1c80 -ATTRIB_HIDE

# Power button action
powercfg -attributes 4f971e89-eebd-4455-a8de-9e59040e7347 7648efa3-dd9c-4e3e-b566-50f929386280 -ATTRIB_HIDE

# Energy Saver Policy
powercfg -attributes de830923-a562-41af-a086-e3a2c6bad2da 5c5bb349-ad29-4ee2-9d0b-2b25270f7a81 -ATTRIB_HIDE

# Processor performance core parking decrease time
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 dfd10d17-d5eb-45dd-877a-9a34ddd15c82 -ATTRIB_HIDE

# NVIDIA-näytön virransäästöteknologia
powercfg -attributes 7516b95f-f776-4464-8c53-06167f40cc99 89cc76a4-f226-4d4b-a040-6e9a1da9b882 -ATTRIB_HIDE

# Hub Selective Suspend Timeout
powercfg -attributes 2a737441-1930-4402-8d77-b2bebba308a3 0853a681-27c8-4100-a2fd-82013e970683 -ATTRIB_HIDE

# Processor performance core parking min cores
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 0cc5b647-c1df-4637-891a-dec35c318583 -ATTRIB_HIDE

# Processor performance core parking min cores for Processor Power Efficiency Class 1
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 0cc5b647-c1df-4637-891a-dec35c318584 -ATTRIB_HIDE

# Allow Away Mode Policy
powercfg -attributes 238c9fa8-0aad-41ed-83f4-97be242c8f20 25dfa149-5dd1-4736-b5ab-e8a37b5b8187 -ATTRIB_HIDE

# Latency sensitivity hint min unparked cores/packages
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 616cdaa5-695e-4545-97ad-97dc2d1bdd88 -ATTRIB_HIDE

# Latency sensitivity hint min unparked cores/packages for Processor Power Efficiency Class 1
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 616cdaa5-695e-4545-97ad-97dc2d1bdd89 -ATTRIB_HIDE

# Execution Required power request timeout
powercfg -attributes 2e601130-5351-4d9d-8e04-252966bad054 3166bc41-7e98-4e03-b34e-ec0f5f2b218e -ATTRIB_HIDE

# Standby Budget Percent
powercfg -attributes 8619b916-e004-4dd8-9b66-dae86f806698 9fe527be-1b70-48da-930d-7bcf17b44990 -ATTRIB_HIDE

# Dimmed display brightness
powercfg -attributes 7516b95f-f776-4464-8c53-06167f40cc99 f1fbfde2-a960-4165-9f88-50667911ce96 -ATTRIB_HIDE

# Interrupt Steering Mode
powercfg -attributes 48672f38-7a9a-4bb2-8bf8-3d85be19de4e 2bfc24f9-5ea2-4801-8213-3dbae01aa39d -ATTRIB_HIDE

# System unattended sleep timeout
powercfg -attributes 238c9fa8-0aad-41ed-83f4-97be242c8f20 7bc4a2f9-d8fc-4469-b07b-33eb785aaca0 -ATTRIB_HIDE

# Processor duty cycling
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 4e4450b3-6179-4e91-b8f1-5bb9938f81a1 -ATTRIB_HIDE

# Processor idle state maximum
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 9943e905-9a30-4ec1-9b99-44dd3b76f7a2 -ATTRIB_HIDE

# Processor performance decrease threshold
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 12a0ab44-fe28-4fa9-b3bd-4b64f44960a6 -ATTRIB_HIDE

# Processor performance decrease threshold for Processor Power Efficiency Class 1
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 12a0ab44-fe28-4fa9-b3bd-4b64f44960a7 -ATTRIB_HIDE

# Console lock display off timeout
powercfg -attributes 7516b95f-f776-4464-8c53-06167f40cc99 8ec4b3a5-6868-48c2-be75-4f3044be88a7 -ATTRIB_HIDE

# Display brightness weight
powercfg -attributes de830923-a562-41af-a086-e3a2c6bad2da 13d09884-f74e-474a-a852-b6bde8ad03a8 -ATTRIB_HIDE

# Processor performance increase time
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 984cf492-3bed-4488-a8f9-4286c97bf5aa -ATTRIB_HIDE

# Allow Standby States
powercfg -attributes 238c9fa8-0aad-41ed-83f4-97be242c8f20 abfc2519-3608-4c2a-94ea-171b0ed546ab -ATTRIB_HIDE

# Processor performance increase time for Processor Power Efficiency Class 1
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 984cf492-3bed-4488-a8f9-4286c97bf5ab -ATTRIB_HIDE

# Processor idle disable
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 5d76a2ca-e8c0-402f-a133-2158492d58ad -ATTRIB_HIDE

# Processor performance core parking concurrency threshold
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 2430ab6f-a520-44a2-9601-f7f23b5134b1 -ATTRIB_HIDE

# Lid open action
powercfg -attributes 4f971e89-eebd-4455-a8de-9e59040e7347 99ff10e7-23b1-4c07-a9d1-5c3206d741b4 -ATTRIB_HIDE

# Heterogeneous policy in effect
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 7f2f5cfa-f10c-4823-b5e1-e93ae85f46b5 -ATTRIB_HIDE

# Enable adaptive brightness
powercfg -attributes 7516b95f-f776-4464-8c53-06167f40cc99 fbd9aa66-9553-4097-ba44-ed6e9d65eab8 -ATTRIB_HIDE

# Allow Throttle States
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 3b04d4fd-1cc7-4f23-ab1c-d1337819c4bb -ATTRIB_HIDE

# Processor performance level increase threshold for Processor Power Efficiency Class 1 processor count increase
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 b000397d-9b0b-483d-98c9-692a6060cfbf -ATTRIB_HIDE

# Initial performance for Processor Power Efficiency Class 1 when unparked
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 1facfc65-a930-4bc5-9f38-504ec097bbc0 -ATTRIB_HIDE

# Processor performance increase time for Processor Power Efficiency Class 1
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 4009efa7-e72d-4cba-9edf-91084ea8cbc3 -ATTRIB_HIDE

# Processor performance time check interval
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 4d2b0152-7d5c-498b-88e2-34345392a2c5 -ATTRIB_HIDE

# Processor performance decrease policy
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 40fbefc7-2e9d-4d25-a185-0cfd8574bac6 -ATTRIB_HIDE

# Processor performance core parking increase policy
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 c7be0679-2817-4d69-9d02-519a537ed0c6 -ATTRIB_HIDE

# Processor performance boost mode
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 be337238-0d82-4146-a960-4f3749d470c7 -ATTRIB_HIDE

# Processor performance decrease policy for Processor Power Efficiency Class 1
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 40fbefc7-2e9d-4d25-a185-0cfd8574bac7 -ATTRIB_HIDE

# Maximum Power Level
powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 51dea550-bb38-4bc4-991b-eacf37be5ec8 -ATTRIB_HIDE

# Processor performance decrease time
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 d8edeb9b-95cf-4f95-a73c-b061973693c8 -ATTRIB_HIDE

# Processor performance decrease time for Processor Power Efficiency Class 1
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 d8edeb9b-95cf-4f95-a73c-b061973693c9 -ATTRIB_HIDE

# Display brightness
powercfg -attributes 7516b95f-f776-4464-8c53-06167f40cc99 aded5e82-b909-4619-9949-f5d71dac0bcb -ATTRIB_HIDE

# Mukautuva taustavalo
powercfg -attributes 7516b95f-f776-4464-8c53-06167f40cc99 aded5e82-b909-4619-9949-f5d71dac0bcc -ATTRIB_HIDE

# JavaScript Timer Frequency
powercfg -attributes 02f815b5-a5cf-4c84-bf20-649d1f75d3d8 4c793e7d-a264-42e1-87d3-7a0d2f523ccd -ATTRIB_HIDE

# Standby Reserve Time
powercfg -attributes 8619b916-e004-4dd8-9b66-dae86f806698 468fe7e5-1158-46ec-88bc-5b96c9e44fd0 -ATTRIB_HIDE

# Processor performance core parking overutilization threshold
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 943c8cb6-6f93-4227-ad87-e9a3feec08d1 -ATTRIB_HIDE

# Processor performance core parking utility distribution
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 e0007330-f589-42ed-a401-5ddb10e785d3 -ATTRIB_HIDE

# Charge level
powercfg -attributes de830923-a562-41af-a086-e3a2c6bad2da e69653ca-cf7f-4f05-aa73-cb833fa90ad4 -ATTRIB_HIDE

# Enable forced button/lid shutdown
powercfg -attributes 4f971e89-eebd-4455-a8de-9e59040e7347 833a6b62-dfa4-46d1-82f8-e09e34d029d6 -ATTRIB_HIDE

# Sleep after
powercfg -attributes 238c9fa8-0aad-41ed-83f4-97be242c8f20 29f6c1db-86da-48c5-9fdb-f2b67b1f44da -ATTRIB_HIDE

# Allow system required policy
powercfg -attributes 238c9fa8-0aad-41ed-83f4-97be242c8f20 a4b195f5-8225-47d8-8012-9d41369786e2 -ATTRIB_HIDE

# Start menu power button
powercfg -attributes 4f971e89-eebd-4455-a8de-9e59040e7347 a7066653-8d6c-40a8-910e-a1f54b84c7e5 -ATTRIB_HIDE

# Sleep button action
powercfg -attributes 4f971e89-eebd-4455-a8de-9e59040e7347 96996bc0-ad50-47ec-923b-6f41874dd9eb -ATTRIB_HIDE

# Maximum processor state
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 bc5038f7-23e0-4960-96da-33abaf5935ec -ATTRIB_HIDE

# Processor performance decrease time for Processor Power Efficiency Class 1
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 7f2492b6-60b1-45e5-ae55-773f8cd5caec -ATTRIB_HIDE

# Maximum processor state for Processor Power Efficiency Class 1
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 bc5038f7-23e0-4960-96da-33abaf5935ed -ATTRIB_HIDE

# Dim display after
powercfg -attributes 7516b95f-f776-4464-8c53-06167f40cc99 17aaa29b-8b43-4b94-aafe-35f64daaf1ee -ATTRIB_HIDE

# User Presence Prediction mode
powercfg -attributes 8619b916-e004-4dd8-9b66-dae86f806698 82011705-fb95-4d46-8d35-4042b1d20def -ATTRIB_HIDE

# Processor performance core parking distribution threshold
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 4bdaf4e9-d103-46d7-a5f0-6280121616ef -ATTRIB_HIDE

# Target Load
powercfg -attributes 48672f38-7a9a-4bb2-8bf8-3d85be19de4e 73cde64d-d720-4bb2-a860-c755afe77ef2 -ATTRIB_HIDE

# Non-sensor Input Presence Timeout
powercfg -attributes 8619b916-e004-4dd8-9b66-dae86f806698 5adbbfbc-074e-4da1-ba38-db8b36b2c8f3 -ATTRIB_HIDE

# When playing video
powercfg -attributes 9596fb26-9850-41fd-ac3e-f7c3c00afd4b 34c7b99f-9a6d-4b3c-8dc7-b6693b78cef4 -ATTRIB_HIDE

# Slide show
powercfg -attributes 0d7dbae2-4294-402a-ba8e-26777e8488cd 309dce9b-bef4-4119-9921-a851fb12f0f4 -ATTRIB_HIDE

# Link State Power Management
powercfg -attributes 501a4d13-42af-4429-9fd1-a8218c268e20 ee12f906-d277-404b-b6da-e5fa1a576df5 -ATTRIB_HIDE

# Processor autonomous activity window
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 cfeda3d0-7697-4566-a922-a9086cd49dfa -ATTRIB_HIDE


@dabugen
Copy link

dabugen commented May 14, 2018

Does not work here, unfortunately. This is what I am getting:

Set-ExecutionPolicy : Windows PowerShell updated your execution policy successfully, but the setting is overridden by
a policy defined at a more specific scope. Due to the override, your shell will retain its current effective
execution policy of Unrestricted. Type "Get-ExecutionPolicy -List" to view your execution policy settings. For more
information please see "Get-Help Set-ExecutionPolicy".
At line:1 char:46

  • ... -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & 'C ...
  •                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : PermissionDenied: (:) [Set-ExecutionPolicy], SecurityException
    • FullyQualifiedErrorId : ExecutionPolicyOverride,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand
      Get-WmiObject :
      At C:\Users\Administrator\Desktop\Tune & Management\Windows Inplace Upgrade\10. Power Scheme & Unlock All Power
      Options\enable-all-advanced-power-settings.ps1:6 char:22
  • ... tingTable = Get-WmiObject -Namespace root\cimv2\power -Class Win32_Po ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Get-WmiObject], FileNotFoundException
    • FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

Exception calling "Format" with "2" argument(s): "Value cannot be null.
Parameter name: args"
At C:\Users\Administrator\Desktop\Tune & Management\Windows Inplace Upgrade\10. Power Scheme & Unlock All Power
Options\enable-all-advanced-power-settings.ps1:30 char:3

  • $descr = [string]::Format("# {0}", $s.ElementName)
  • + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException
    
    

powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 0b2d69d7-a2a1-449c-9680-f91c70521c60 -ATTRIB_HIDE

Exception calling "Format" with "2" argument(s): "Value cannot be null.
Parameter name: args"
At C:\Users\Administrator\Desktop\Tune & Management\Windows Inplace Upgrade\10. Power Scheme & Unlock All Power
Options\enable-all-advanced-power-settings.ps1:30 char:3

  • $descr = [string]::Format("# {0}", $s.ElementName)
  • + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException
    
    

powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 51dea550-bb38-4bc4-991b-eacf37be5ec8 -ATTRIB_HIDE

Exception calling "Format" with "2" argument(s): "Value cannot be null.
Parameter name: args"
At C:\Users\Administrator\Desktop\Tune & Management\Windows Inplace Upgrade\10. Power Scheme & Unlock All Power
Options\enable-all-advanced-power-settings.ps1:30 char:3

  • $descr = [string]::Format("# {0}", $s.ElementName)
  • + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException
    
    

powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 6738e2c4-e8a5-4a42-b16a-e040e769756e -ATTRIB_HIDE

Exception calling "Format" with "2" argument(s): "Value cannot be null.
Parameter name: args"
At C:\Users\Administrator\Desktop\Tune & Management\Windows Inplace Upgrade\10. Power Scheme & Unlock All Power
Options\enable-all-advanced-power-settings.ps1:30 char:3

  • $descr = [string]::Format("# {0}", $s.ElementName)
  • + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException
    
    

powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 80e3c60e-bb94-4ad8-bbe0-0d3195efc663 -ATTRIB_HIDE

Exception calling "Format" with "2" argument(s): "Value cannot be null.
Parameter name: args"
At C:\Users\Administrator\Desktop\Tune & Management\Windows Inplace Upgrade\10. Power Scheme & Unlock All Power
Options\enable-all-advanced-power-settings.ps1:30 char:3

  • $descr = [string]::Format("# {0}", $s.ElementName)
  • + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException
    
    

powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 d3d55efd-c1ff-424e-9dc3-441be7833010 -ATTRIB_HIDE

Exception calling "Format" with "2" argument(s): "Value cannot be null.
Parameter name: args"
At C:\Users\Administrator\Desktop\Tune & Management\Windows Inplace Upgrade\10. Power Scheme & Unlock All Power
Options\enable-all-advanced-power-settings.ps1:30 char:3

  • $descr = [string]::Format("# {0}", $s.ElementName)
  • + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException
    
    

powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 d639518a-e56d-4345-8af2-b9f32fb26109 -ATTRIB_HIDE

Exception calling "Format" with "2" argument(s): "Value cannot be null.
Parameter name: args"
At C:\Users\Administrator\Desktop\Tune & Management\Windows Inplace Upgrade\10. Power Scheme & Unlock All Power
Options\enable-all-advanced-power-settings.ps1:30 char:3

  • $descr = [string]::Format("# {0}", $s.ElementName)
  • + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException
    
    

powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 dab60367-53fe-4fbc-825e-521d069d2456 -ATTRIB_HIDE

Exception calling "Format" with "2" argument(s): "Value cannot be null.
Parameter name: args"
At C:\Users\Administrator\Desktop\Tune & Management\Windows Inplace Upgrade\10. Power Scheme & Unlock All Power
Options\enable-all-advanced-power-settings.ps1:30 char:3

  • $descr = [string]::Format("# {0}", $s.ElementName)
  • + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException
    
    

powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 dbc9e238-6de9-49e3-92cd-8c2b4946b472 -ATTRIB_HIDE

Exception calling "Format" with "2" argument(s): "Value cannot be null.
Parameter name: args"
At C:\Users\Administrator\Desktop\Tune & Management\Windows Inplace Upgrade\10. Power Scheme & Unlock All Power
Options\enable-all-advanced-power-settings.ps1:30 char:3

  • $descr = [string]::Format("# {0}", $s.ElementName)
  • + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException
    
    

powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 fc95af4d-40e7-4b6d-835a-56d131dbc80e -ATTRIB_HIDE

Exception calling "Format" with "2" argument(s): "Value cannot be null.
Parameter name: args"
At C:\Users\Administrator\Desktop\Tune & Management\Windows Inplace Upgrade\10. Power Scheme & Unlock All Power
Options\enable-all-advanced-power-settings.ps1:30 char:3

  • $descr = [string]::Format("# {0}", $s.ElementName)
  • + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException
    

@raspi
Copy link
Author

raspi commented Jun 18, 2018

@dabugen as it says: you need to set your PowerShell Execution Policy. See: Get-Help Set-ExecutionPolicy.

@bfoos
Copy link

bfoos commented Oct 12, 2019

is "$descr = [string]::Format("# {0}", $s.ElementName)" correct formatting? Because it does not return the description. In fact it causes an error...

Exception calling "Format" with "2" argument(s): "Value cannot be null.
Parameter name: args"
At D:\Powercfg-Shit\enable-all-advanced-power-settings.ps1:30 char:3

  • $descr = [string]::Format("# {0}", $s.ElementName)
  • + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException
    

@banicpe
Copy link

banicpe commented Dec 21, 2019

I forgot to backup default settings. can someone post me original default hidden/unhidden attributes please?

ps - (btw, script works just as it should, i used wind10, administrator account).

@ar-ml
Copy link

ar-ml commented Dec 29, 2019

Since I have used above script in windows powershell, I have lost all advanced power settings and can not get them back (even the ones I had before are gone now). Windows is diplaying "Energyplaninformation not available" now.
I tried to undo my changes by setting most settings back to +ATTRIB_HIDE and only some to -ATTRIB_HIDE - but it did not work.
See screenshot below.
Any idea how to fix this?
2019-12-29 05_50_22-Enable all advanced power settings in Windows

@banicpe
Copy link

banicpe commented Dec 29, 2019

Launch your Registry Editor (Windows button and type “Regedit“)
Navigate to: “Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power“
Select the entry called ‘CsEnabled‘
Change the “Value data” to “1” and select “OK“ (in the case it's alreaedy 1 try 0 and reboot and again to 1)
Reboot your machine

@ar-ml
Copy link

ar-ml commented Dec 31, 2019

@banicpe thx very much! Setting Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power 'CsEnabled‘ to "0" and rebooting, worked for me. I can see all Advanced Energy Options now! Great!

Anyone knows why MS hid those settings in the first place? Is it dangerous to fiddle around with them (e.g. with processor performance settings)?

@Slach
Copy link

Slach commented Jun 10, 2020

@banicpe @ar-ml and all others who will landing to this page from StackOverflow or google

also helpful
export
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings
and change all
"Attributes"=dword:00000001
to
"Attributes"=dword:00000000

and import PowerSettings back

@Velocet
Copy link

Velocet commented Jun 15, 2020

I have written my own version which works with PowerShell 7 and every Windows version: Unlock-PowerCfg.ps1

# Unlock Power Plans by disabling "Connected Standby"
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Power' -Name 'CSEnabled' -Value 0 -Force

# Unlock hidden options
$PowerSettings = Get-ChildItem -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerSettings' -Recurse -Depth 1 | Where-Object { $_.PSChildName -NotLike 'DefaultPowerSchemeValues' -and $_.PSChildName -NotLike '0' -and $_.PSChildName -NotLike '1' }
ForEach ($item in $PowerSettings) { Set-ItemProperty -Path ($item).Replace('HKEY_LOCAL_MACHINE','HKLM:') -Name 'Attributes' -Value 2 -Force }

@nick4fake
Copy link

@Velocet, small fix:

Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Power' -Name 'CSEnabled' -Value 0 -Force
    # Unlock hidden options
    $PowerSettings = Get-ChildItem -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerSettings' -Recurse -Depth 1 | Where-Object { $_.PSChildName -NotLike 'DefaultPowerSchemeValues' -and $_.PSChildName -NotLike '0' -and $_.PSChildName -NotLike '1' }
    ForEach ($item in $PowerSettings) { Set-ItemProperty -Path ($item).Name.Replace('HKEY_LOCAL_MACHINE','HKLM:') -Name 'Attributes' -Value 2 -Force }

@VLDG2712
Copy link

VLDG2712 commented Feb 3, 2023

god thank you @Velocet @nick4fake guys!!!

@AutomationEngineer0817
Copy link

Thanks @Velocet, your script actually works WIN 11 also, your amazing

@lavinnyv
Copy link

lavinnyv commented Sep 8, 2023

what would i change to DISABLE all advanced power settings?

@Argimko
Copy link

Argimko commented Jun 4, 2024

Instead of enable all options you can use Power settings GUI editor PowerSettingsExplorer

@Velocet
Copy link

Velocet commented Jun 5, 2024

At least for my solution you don’t enable them: All settings become visible. Thats it.

I also wouldn’t download something from a random mediafire link posted on the internet… 🤨

@Argimko
Copy link

Argimko commented Jun 5, 2024

Sorry, I have updated link to forum thread instead of direct zip

@lucr80
Copy link

lucr80 commented Sep 27, 2024

Could someone explain the basics to me? Do you have a video explaining how to install? Or is it just right-clicking and running in PowerShell?

@Velocet
Copy link

Velocet commented Oct 3, 2024

@lucr80 Just copy those lines and paste in a PowerShell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment