Change power plan to High Performance via Powershell

By calling the activate method in the Win32_PowerPlan class via this command the power option High Performance is set :

Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerPlan -Filter "ElementName = 'High Performance'"

$powerplan = Get-CimInstance -Name root\cimv2\power -Class win32_PowerPlan -Filter "ElementName = 'High Performance'"      
powercfg /setactive ([string]$powerplan.InstanceID).Replace("Microsoft:PowerPlan\{","").Replace("}","")

To never turn off display use powercfg

powercfg -change -monitor-timeout-ac 0
powercfg -change -standby-timeout-ac 0
powercfg -change -hibernate-timeout-ac 0


# set powerscheme with powercfg
powercfg.exe /setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

# create ultimate powerscheme
powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61

More information :
Customize the Windows performance power slider | Microsoft Learn

Leave a Reply

Your email address will not be published. Required fields are marked *