Skip to content

Commit

Permalink
Disable powercfg fix (ChrisTitusTech#2728)
Browse files Browse the repository at this point in the history
  • Loading branch information
AtisFPS authored Sep 20, 2024
1 parent 3f2759f commit 3777587
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/public/Invoke-WPFUltimatePerformance.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ Function Invoke-WPFUltimatePerformance {

} elseif ($State -eq "Disable") {
# Check if the Ultimate Performance plan is installed by GUID
$installedPlan = powercfg -list | Select-String -Pattern $ultimateGUID
$installedPlan = (powercfg -list | Select-String -Pattern "ChrisTitus - Ultimate Power Plan").Line.Split()[3]

if ($installedPlan) {
# Extract the GUID of the installed Ultimate Performance plan
$ultimatePlanGUID = $installedPlan.Line.Split()[3]

# Set a different power plan as active before deleting the Ultimate Performance plan
$balancedPlanGUID = (powercfg -list | Select-String -Pattern "Balanced").Line.Split()[3]
$balancedPlanGUID = 381b4222-f694-41f0-9685-ff5bb260df2e
powercfg -setactive $balancedPlanGUID

# Delete the Ultimate Performance plan by GUID
Expand Down

0 comments on commit 3777587

Please sign in to comment.