From 377758758ec4efcb109ff7a511517b785e323ec9 Mon Sep 17 00:00:00 2001 From: Atis <94861317+AtisFPS@users.noreply.github.com> Date: Fri, 20 Sep 2024 16:04:26 +0200 Subject: [PATCH] Disable powercfg fix (#2728) --- functions/public/Invoke-WPFUltimatePerformance.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/public/Invoke-WPFUltimatePerformance.ps1 b/functions/public/Invoke-WPFUltimatePerformance.ps1 index ac1dc1a6..8fe24c95 100644 --- a/functions/public/Invoke-WPFUltimatePerformance.ps1 +++ b/functions/public/Invoke-WPFUltimatePerformance.ps1 @@ -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