Add log messages
This commit is contained in:
parent
c40d4ed83f
commit
7731c0dd71
1 changed files with 2 additions and 0 deletions
|
@ -375,6 +375,7 @@ class Context {
|
|||
$currentScheme = [regex]::Match((powercfg /GETACTIVESCHEME), "Power Scheme GUID: ([0-9a-f-]) ").Groups[1].Value;
|
||||
|
||||
if ($currentScheme -ne $performanceScheme) {
|
||||
Write-Information "Disabling Power Save mode";
|
||||
$this.Set("Power Scheme", $currentScheme);
|
||||
powercfg /S 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c;
|
||||
}
|
||||
|
@ -388,6 +389,7 @@ class Context {
|
|||
$originalScheme = $this.Get("Power Scheme");
|
||||
|
||||
if ($originalScheme) {
|
||||
Write-Information "Reset power plan to original state";
|
||||
powercfg /S $originalScheme;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue