mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 14:45:52 -06:00
Disable powercfg fix (#2728)
This commit is contained in:
parent
3f2759f967
commit
377758758e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user