Skip to content
Snippets Groups Projects
Commit b0c999e5 authored by han44's avatar han44
Browse files

Add an option to run High Performance Power Plan

parent bd10047e
No related branches found
No related tags found
1 merge request!2Add an option to run High Performance Power Plan
...@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment