Skip to content

Instantly share code, notes, and snippets.

@Velocet
Last active November 15, 2023 09:33
  • Star 34 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment