diff --git a/scripts/Windows/OS/User.ps1 b/scripts/Windows/OS/User.ps1 index c0554eae..8fb7fae2 100644 --- a/scripts/Windows/OS/User.ps1 +++ b/scripts/Windows/OS/User.ps1 @@ -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;