Disable scheduled task registration

This commit is contained in:
Manuel Thalmann 2023-06-28 22:07:18 +02:00
parent 2b1b9cb449
commit 94a5f09aa4

View file

@ -52,8 +52,7 @@ function Enable-UACNextLogin() {
" ", " ",
@( @(
"-c", "-c",
"Set-ItemProperty `"$keyPath`" -Name `"$propertyName`" -Value 0;", "Set-ItemProperty `"$keyPath`" -Name `"$propertyName`" -Value 0;")));
"Unregister-ScheduledTask -Force $taskName;")));
$trigger = New-ScheduledTaskTrigger -AtLogOn; $trigger = New-ScheduledTaskTrigger -AtLogOn;
$principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -RunLevel Highest; $principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -RunLevel Highest;