Commit e41ca1c8 authored by han44's avatar han44
Browse files

Merge branch 'HighPerf_As_Post' into 'master'

Add an option to run High Performance Power Plan

See merge request !2
parents bd10047e b0c999e5
...@@ -67,7 +67,10 @@ param( ...@@ -67,7 +67,10 @@ param(
[switch]$CMTraceForLogs, [switch]$CMTraceForLogs,
# Skip running Windows Updates # Skip running Windows Updates
[switch]$SkipWU [switch]$SkipWU,
# Run the High Performance Power Plan script as a post-action
[switch]$HighPower
) )
function log($msg) { function log($msg) {
...@@ -299,6 +302,12 @@ if($TeamsMsg -ne 'false') { ...@@ -299,6 +302,12 @@ if($TeamsMsg -ne 'false') {
powershell.exe -executionpolicy bypass -file "$scripts\post-to-teams.ps1" -message "$TeamsMsg (_$addinfo1, *$addinfo2*_)" -title $TeamsName -webhook $TeamsWebhook > $teamslog 2>&1 powershell.exe -executionpolicy bypass -file "$scripts\post-to-teams.ps1" -message "$TeamsMsg (_$addinfo1, *$addinfo2*_)" -title $TeamsName -webhook $TeamsWebhook > $teamslog 2>&1
} }
if($HighPower) {
$powerplanlog = "$engritLogPath\set-high-performance-power-plan.log"
log "Log will go to $($powerplanlog)..."
powershell.exe -executionpolicy bypass -file "$scripts\set-high-performance-power-plan.ps1" > $powerplanlog 2>&1
}
# forces immediate computer reboot # forces immediate computer reboot
log "Rebooting..." log "Rebooting..."
shutdown /r /t 0 shutdown /r /t 0
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment