Created
August 17, 2023 06:51
-
-
Save default-writer/7257a734def25a2f3b6c636c8fb463d7 to your computer and use it in GitHub Desktop.
CPU maximum frequency setup
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 characters
$targetFrequency = 2266 # 2266 MHz in MHz | |
# Get the current power plan | |
$currentPlan = powercfg -getactivescheme | |
$guidPattern = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}" | |
$matches = $currentPlan | Select-String -Pattern $guidPattern -AllMatches | |
$guid = $matches.Matches[0].Value | |
# Set the maximum processor frequency | |
powercfg -setacvalueindex $guid 54533251-82be-4824-96c1-47b60b740d00 75b0ae3f-bce0-45a7-8c89-c9611c25e100 $targetFrequency | |
powercfg -setdcvalueindex $guid 54533251-82be-4824-96c1-47b60b740d00 75b0ae3f-bce0-45a7-8c89-c9611c25e100 $targetFrequency | |
# Apply the changes to the power plan | |
powercfg -s $guid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment