Last active
October 30, 2025 06:16
-
Star
(116)
You must be signed in to star a gist -
Fork
(6)
You must be signed in to fork a gist
-
-
Save Velocet/7ded4cd2f7e8c5fa475b8043b76561b5 to your computer and use it in GitHub Desktop.
Revisions
-
Velocet revised this gist
May 11, 2022 . 3 changed files with 14 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,9 @@ #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 } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ (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} This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,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 -
Velocet revised this gist
Jun 15, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,4 +6,4 @@ The OneLiner version is untested but should also work... Requirements: - Windows 7 - 10 - Elevated PowerShell v2 - v7 -
Velocet revised this gist
Jun 15, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,4 +6,4 @@ The OneLiner version is untested but should also work... Requirements: - Windows 7 - 10 - Elevated PowerShell v2 - v7 (started with Administrator rights) -
Velocet revised this gist
Jun 15, 2020 . 2 changed files with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ gci -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerSettings' -Recurse -Depth 1 | ? { $_.PSChildName -NotLike 'DefaultPowerSchemeValues' -and $_.PSChildName -NotLike '0' -and $_.PSChildName -NotLike '1' } | % {sp -Path ($_).Replace('HKEY_LOCAL_MACHINE','HKLM:') -Name 'Attributes' -Value 2 -Force } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,8 @@ Unlock every Power Plan and corresponding option on Windows. Just paste in an el Use this instead of some shady PowerCfg commands or .reg file as this script works even for newer/unknown settings: It will look up the PowerSettings registry hive and just add or change a value (Attributes = 2) on the corresponding option to reveal it. The OneLiner version is untested but should also work... Requirements: - Windows 7 - 10 - PowerShell v2 - v7 -
Velocet created this gist
Jun 15, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ #Requires -RunAsAdministrator if (!$IsLinux -and !$IsMacOS) { # 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 } } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ Unlock every Power Plan and corresponding option on Windows. Just paste in an elevated PowerShell. Use this instead of some shady PowerCfg commands or .reg file as this script works even for newer/unknown settings: It will look up the PowerSettings registry hive and just add or change a value (Attributes = 2) on the corresponding option to reveal it. Requirements: Windows 7 - 10 PowerShell v2 - v7