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",
|
"-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;
|
||||||
|
|
Loading…
Reference in a new issue