Fix compile script, update VM tools, Vagrant -> 2.0.3
This commit is contained in:
@@ -1,7 +1,20 @@
|
||||
Try {
|
||||
Write-Output "Set power plan to high performance"
|
||||
|
||||
$HighPerf = powercfg -l | %{if($_.contains("High performance")) {$_.split()[3]}}
|
||||
|
||||
# $HighPerf cannot be $null, we try activate this power profile with powercfg
|
||||
#
|
||||
if ($HighPerf -eq $null)
|
||||
{
|
||||
throw "Error: HighPerf is null"
|
||||
}
|
||||
|
||||
$CurrPlan = $(powercfg -getactivescheme).split()[3]
|
||||
|
||||
if ($CurrPlan -ne $HighPerf) {powercfg -setactive $HighPerf}
|
||||
|
||||
} Catch {
|
||||
Write-Warning -Message "Unable to set power plan to high performance"
|
||||
Write-Warning $Error[0]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user