Automate Your Windows Updates
Running updates manually is a chore. Here is a set-and-forget solution to keep your Windows apps up to date using Winget and Task Scheduler.
Takes about 5 minutes to set up.
Step 1: Create the PowerShell Script
We need a script that runs the update command silently.
- Create a folder
C:\scripts(or any location you prefer). - Create a new file named
weekly-update.ps1. - Paste the following code inside:
Start-Process winget -ArgumentList "upgrade --all --silent --accept-package-agreements --accept-source-agreements" -Verb RunAs -Wait
What this does:
--silent: Runs without popping up windows for every app.--accept-package-agreements: Auto-accepts licenses.-Verb RunAs: Ensures it runs with Administrator privileges.-Wait: Waits for the process to finish.
Step 2: Schedule the Task
Now, let's make Windows run this script automatically.
- Press
Win + R, typetaskschd.msc, and hit Enter to open Task Scheduler. - Click Create Task (on the right pane).
General Tab
- Name: Weekly Winget Update
- Security Options: Check Run with highest privileges (Crucial!).
- Configure for: Windows 10 or 11.
Triggers Tab
- Click New.
- Begin the task: On a schedule.
- Settings: Select Weekly.
- Choose a day and time (e.g., Sunday at 3:00 AM).
- Make sure Enabled is checked.
Actions Tab
- Click New.
- Action: Start a program.
- Program/script:
powershell.exe - Add arguments:
-ExecutionPolicy Bypass -File "C:\scripts\weekly-update.ps1" - Start in:
C:\scripts
Conditions Tab (Optional)
- Power: Uncheck "Start the task only if the computer is on AC power" if you want it to run on laptops even when unplugged.
Settings Tab
- Check Run task as soon as possible after a scheduled start is missed. This ensures you get updated even if your PC was off at 3 AM.
That's It!
Now, every week at your chosen time, Windows will silently check for updates and install them. You won't have to lift a finger.