diff --git a/smsts-post-action.ps1 b/smsts-post-action.ps1 index a0ef8dc2c7991359c0d6b543826761f4bf545949..7c9a1d876267a30fe14c6ff6fd9cab7fc89be554 100644 --- a/smsts-post-action.ps1 +++ b/smsts-post-action.ps1 @@ -67,7 +67,10 @@ param( [switch]$CMTraceForLogs, # Skip running Windows Updates - [switch]$SkipWU + [switch]$SkipWU, + + # Run the High Performance Power Plan script as a post-action + [switch]$HighPower ) function log($msg) { @@ -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 } +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 log "Rebooting..." shutdown /r /t 0 \ No newline at end of file