Fix incorrect code statement

This commit is contained in:
Manuel Thalmann 2023-06-28 12:32:46 +02:00
parent 412b23cfc2
commit 20d58b32d1

View file

@ -53,5 +53,5 @@ function Enable-UACNextLogin() {
$trigger = New-ScheduledTaskTrigger -AtLogOn;
$principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -RunLevel Highest;
$task = New-ScheduledTask -Action $action -Principal $principal -Trigger $trigger;
Register-ScheduledTask $taskName $task;
Register-ScheduledTask $taskName -InputObject $task;
}