Disable scheduled task registration
This commit is contained in:
parent
2b1b9cb449
commit
94a5f09aa4
1 changed files with 1 additions and 2 deletions
|
@ -52,8 +52,7 @@ function Enable-UACNextLogin() {
|
|||
" ",
|
||||
@(
|
||||
"-c",
|
||||
"Set-ItemProperty `"$keyPath`" -Name `"$propertyName`" -Value 0;",
|
||||
"Unregister-ScheduledTask -Force $taskName;")));
|
||||
"Set-ItemProperty `"$keyPath`" -Name `"$propertyName`" -Value 0;")));
|
||||
|
||||
$trigger = New-ScheduledTaskTrigger -AtLogOn;
|
||||
$principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -RunLevel Highest;
|
||||
|
|
Loading…
Reference in a new issue