Initial commit
This commit is contained in:
7
Packer/scripts/set-powerplan.ps1
Executable file
7
Packer/scripts/set-powerplan.ps1
Executable file
@@ -0,0 +1,7 @@
|
||||
Try {
|
||||
$HighPerf = powercfg -l | %{if($_.contains("High performance")) {$_.split()[3]}}
|
||||
$CurrPlan = $(powercfg -getactivescheme).split()[3]
|
||||
if ($CurrPlan -ne $HighPerf) {powercfg -setactive $HighPerf}
|
||||
} Catch {
|
||||
Write-Warning -Message "Unable to set power plan to high performance"
|
||||
}
|
||||
Reference in New Issue
Block a user