← Intune

📦 Winget Update All Apps

Intune Platform Script · Deploys a daily scheduled task that silently upgrades all apps via winget
Runs as the logged-on user — winget is user-context. The platform script runs once via Intune to drop the scheduled task, then the task handles the recurring updates. Works on Windows 11 and Win10 20H2+ with App Installer.
Heads up: Platform scripts run once. Instead of fighting that, use the script to register a Windows Scheduled Task that runs winget daily at 9am. No E3 license required, no remediation needed.
Script
1
Guard — exit if winget missing guard
Exits cleanly if winget isn't present so Intune doesn't report a false error.
# Exit if winget is not installed if (-not (Get-Command winget -ErrorAction SilentlyContinue)) { exit 1 }
2
Register daily scheduled task main
Creates a task that runs winget upgrade every day at 9am as the current user. -ExecutionTimeLimit 0 lets it run as long as it needs.
# Register daily winget upgrade task at 9am $action = New-ScheduledTaskAction -Execute "winget" -Argument "upgrade --all --silent --accept-package-agreements --accept-source-agreements" $trigger = New-ScheduledTaskTrigger -Daily -At 9am $settings = New-ScheduledTaskSettingsSet -ExecutionTimeLimit 0 -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries Register-ScheduledTask -TaskName "WingetDailyUpdate" -Action $action -Trigger $trigger -Settings $settings -Force
Full script — upload this to Intune deploy
Runs once via Intune, registers the task, done. winget handles updates every day after that.
# Deploy daily winget auto-updater via scheduled task if (-not (Get-Command winget -ErrorAction SilentlyContinue)) { exit 1 } $action = New-ScheduledTaskAction -Execute "winget" -Argument "upgrade --all --silent --accept-package-agreements --accept-source-agreements" $trigger = New-ScheduledTaskTrigger -Daily -At 9am $settings = New-ScheduledTaskSettingsSet -ExecutionTimeLimit 0 -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries Register-ScheduledTask -TaskName "WingetDailyUpdate" -Action $action -Trigger $trigger -Settings $settings -Force
Intune Platform Script Settings
Run this script using the logged on credentials Yes
Enforce script signature check No
Run script in 64-bit PowerShell host Yes