diff --git a/Winget-AutoUpdate/Winget-Upgrade.ps1 b/Winget-AutoUpdate/Winget-Upgrade.ps1 index 5ef5bf6..28f1daa 100644 --- a/Winget-AutoUpdate/Winget-Upgrade.ps1 +++ b/Winget-AutoUpdate/Winget-Upgrade.ps1 @@ -323,7 +323,7 @@ if (Test-Network) { #Run user context scheduled task Write-ToLog "Starting WAU in User context..." - Start-ScheduledTask $UserScheduledTask.TaskName -ErrorAction SilentlyContinue + Get-ScheduledTask -TaskName "Winget-AutoUpdate-UserContext" -ErrorAction SilentlyContinue | Start-ScheduledTask -ErrorAction SilentlyContinue Exit 0 } }