Fix for "Set the Ultimate Performance power plan as active" not working #101
Replies: 2 comments
-
Thanks so much for this. I will test it out myself and see if it works. |
Beta Was this translation helpful? Give feedback.
-
Dont work on laptops with a new intel cpu and modern standby. Info
|
Beta Was this translation helpful? Give feedback.
-
Hi!
I've been testing the standard autounattend file, and everything works perfectly except for the activation of the Ultimate Performance Power Plan:
Enable the Ultimate Performance power plan
powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61
Set the Ultimate Performance power plan as active
powercfg -setactive e9a42b02-d5df-448d-aa00-03f14749eb61
This code creates the Ultimate Performance Power Plan but does not activate it properly. The issue is that when the scheme is duplicated, a new GUID is assigned, so the -setactive command does not work as expected.
I've devised a solution to resolve this issue with the following code:
$maxPerformanceScheme = powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61
$guid = [regex]::Match($maxPerformanceScheme, '[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}').Value
powercfg -setactive $guid
I have tested it locally and it works correctly. I use Windows in Spanish, but I understand that in any language it should work.
Beta Was this translation helpful? Give feedback.
All reactions