Power Plan Script for 99% BeeLink
# Get the active power scheme GUID
$activePlanOutput = powercfg /getactivescheme
$activeGuid = ($activePlanOutput -split '\s+')[3]
Write-Host "Active Power Plan GUID: $activeGuid"
# GUID for Processor power management -> Maximum processor state
$maxProcStateGuid = "bc5038f7-23e0-4960-96da-33abaf5935ec"
# Processor power management GUIDs
$subProcessor = '54533251-82be-4824-96c1-47b60b740d00'
# Query AC and DC values
$acValue = powercfg /q $activeGuid $subProcessor $maxProcStateGuid | Select-String "Current AC Power Setting Index"
$dcValue = powercfg /q $activeGuid $subProcessor $maxProcStateGuid | Select-String "Current DC Power Setting Index"
# Convert hex output to percentage
$acPercent = [Convert]::ToInt32(($acValue -split ':\s+')[1], 16)
$dcPercent = [Convert]::ToInt32(($dcValue -split ':\s+')[1], 16)
Write-Host "Active Power Scheme: $activeScheme"
Write-Host "BEFORE: Maximum Processor State (Plugged In / AC): $acPercent%"
Write-Host "BEFORE: Maximum Processor State (On Battery / DC): $dcPercent%"
# Set AC (Plugged In) maximum processor state to 99%
powercfg -setacvalueindex $activeGuid SUB_PROCESSOR $maxProcStateGuid 99
# Set DC (Battery) maximum processor state to 99%
powercfg -setdcvalueindex $activeGuid SUB_PROCESSOR $maxProcStateGuid 99
# Apply the changes by re-activating the current plan
powercfg -setactive $activeGuid
Write-Host "Maximum processor state successfully set to 99% for the active plan."
# Get the active power scheme GUID
#$activeScheme = (powercfg /getactivescheme) -replace '.*:\s+([a-fA-F0-9-]+)\s+.*', '$1'
# Processor power management GUIDs
#$subProcessor = '54533251-82be-4824-96c1-47b60b740d00'
#$maxStateSetting = 'bc5038f7-23e0-4960-96da-33abaf5935ec'
# Query AC and DC values
#$acValue = powercfg /q $activeScheme $subProcessor $maxStateSetting | Select-String "Current AC Power Setting Index"
#$dcValue = powercfg /q $activeScheme $subProcessor $maxStateSetting | Select-String "Current DC Power Setting Index"
# Convert hex output to percentage
#$acPercent = [Convert]::ToInt32(($acValue -split ':\s+')[1], 16)
#$dcPercent = [Convert]::ToInt32(($dcValue -split ':\s+')[1], 16)
#Write-Host "Active Power Scheme: $activeScheme"
#Write-Host "Maximum Processor State (Plugged In / AC): $acPercent%"
#Write-Host "Maximum Processor State (On Battery / DC): $dcPercent%"
No Comments