Skip to content

Instantly share code, notes, and snippets.

View ZaronZ's full-sized avatar
🏠
Working from home

pivasicq ZaronZ

🏠
Working from home
  • Poland
View GitHub Profile
@ZaronZ
ZaronZ / Unlock-PowerCfg.ps1
Created August 3, 2024 07:48 — forked from Velocet/Unlock-PowerCfg.ps1
Unlock/Unhide all Power Plan Settings/Options on Windows 10/11
#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 }