Reboot computer after preparation
This commit is contained in:
parent
0f203caaa7
commit
ecf6b0c573
1 changed files with 2 additions and 1 deletions
|
@ -95,7 +95,8 @@ function Enable-UACNextLogin([Context] $context) {
|
|||
". `"$PSScriptRoot/../Scripts/Context.ps1`";",
|
||||
"`$context = [Context]::new();",
|
||||
"`$context.EntryPoint = `"$($context.EntryPoint)`";",
|
||||
"`$context.RegisterReboot((Get-Item `"Registry::HKEY_USERS\$((Get-LocalUser $context.UserName).SID)))")));
|
||||
"`$context.RegisterReboot((Get-Item `"Registry::HKEY_USERS\$((Get-LocalUser $context.UserName).SID)));",
|
||||
"Restart-Computer;")));
|
||||
|
||||
$trigger = New-ScheduledTaskTrigger -AtLogOn;
|
||||
$principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -RunLevel Highest;
|
||||
|
|
Loading…
Reference in a new issue