Update winget-install-and-update.ps1

pull/2/head
Romanitho 2022-01-17 00:05:32 +01:00 committed by GitHub
parent 4c2c8920ec
commit 7ffa0d0cc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -27,4 +27,7 @@ $taskSettings = New-ScheduledTaskSettingsSet -Compatibility Win8 -AllowStartIfOn
# Set up the task, and register it
$task = New-ScheduledTask -Action $taskAction -Principal $taskUserPrincipal -Settings $taskSettings
Register-ScheduledTask -TaskName 'Winget Update Notify' -InputObject $task -Force
Register-ScheduledTask -TaskName 'Winget Update Notify' -InputObject $task -Force
# Run Winget
Get-ScheduledTask -TaskName "Winget Update" -ErrorAction SilentlyContinue | Start-ScheduledTask -ErrorAction SilentlyContinue