Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sccm-ts-scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
engrit-epm
sccm-ts-scripts
Commits
b0c999e5
Commit
b0c999e5
authored
5 years ago
by
han44
Browse files
Options
Downloads
Patches
Plain Diff
Add an option to run High Performance Power Plan
parent
bd10047e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2
Add an option to run High Performance Power Plan
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
smsts-post-action.ps1
+10
-1
10 additions, 1 deletion
smsts-post-action.ps1
with
10 additions
and
1 deletion
smsts-post-action.ps1
+
10
−
1
View file @
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment