Skip to content

Instantly share code, notes, and snippets.

@Velocet
Last active November 6, 2024 19:28
Show Gist options
  • Save Velocet/7ded4cd2f7e8c5fa475b8043b76561b5 to your computer and use it in GitHub Desktop.
Save Velocet/7ded4cd2f7e8c5fa475b8043b76561b5 to your computer and use it in GitHub Desktop.
Unlock/Unhide all Power Plan Settings/Options on Windows 10/11

Unlock-PowerCfg 1.1.0

Unlock every Power Plan Scheme/Setting on Windows 10/11. Just paste in an elevated PowerShell.

Use this instead of some incomplete PowerCfg commands or old .reg files as this script works even for newer/unknown settings: It will look up the PowerSettings registry hive and add or change a value (Attributes = 2) to reveal it.

Requirements:

  • Windows 7 - 11
  • PowerShell v2 - v7 with admin rights

Also have a look at: https://gist.github.com/raspi/203aef3694e34fefebf772c78c37ec2c

#Requires -RunAsAdministrator
# Unlock-PowerCfg - v22.05.11
# Disable "Connected Standby"
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Power' -Name 'CSEnabled' -Value 0 -Force
# Get Power Settings entries and add/set 'Attributes' to 2 to unhide
$PowerCfg = (Get-ChildItem 'HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerSettings' -Recurse).Name -notmatch '\bDefaultPowerSchemeValues|(\\[0-9]|\b255)$'
foreach ($item in $PowerCfg) { Set-ItemProperty -Path $item.Replace('HKEY_LOCAL_MACHINE','HKLM:') -Name 'Attributes' -Value 2 -Force }
(gci 'HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerSettings' -Recurse).Name -notmatch '\bDefaultPowerSchemeValues|(\\[0-9]|\b255)$' | % {sp $_.Replace('HKEY_LOCAL_MACHINE','HKLM:') -Name 'Attributes' -Value 2 -Force}
@gustavo1spbr
Copy link

Thanks a lot! Very useful!

@Velocet
Copy link
Author

Velocet commented Jun 4, 2024

Thanks! Great to hear that it still works and is helpful :)

@tiagofassoni
Copy link

This was super helpful, specially the one-liner. Thanks so much!

@bobbyaillery
Copy link

I had done this once with instructions on another site. I formatted the PC and couldn't find the site again. This saved me. Thanks a lot. Good work.

@aimagist
Copy link

Thanks!! Unlocked all of my ASUS laptop energy options :) Thanks!!
Windows10x64

@sage-RJ
Copy link

sage-RJ commented Aug 21, 2024

Why is Connected Standby being disabled?

@Solaris17
Copy link

Why is Connected Standby being disabled?

I also want to know this.

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