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.