-
Notifications
You must be signed in to change notification settings - Fork 5
winget_upgrade_all.ps1
Corey Watson edited this page Dec 1, 2025
·
1 revision
Upgrades all winget-managed packages to their latest versions.
Upgrades all winget-managed packages to their latest versions. Includes logging and automatic cleanup of old log files.
Upgrades all winget-managed packages to their latest versions. Includes logging and automatic cleanup of old log files.
- Windows 10 1809+ or Windows 11 or Server 2022
- Administrator privileges
- winget (App Installer) installed
None
- Checks Windows version requirements
- Locates winget executable in WindowsApps
- Runs winget upgrade --all with silent options
- Logs output to Windows temp directory
- Cleans up logs older than 14 days
- No secrets in logs
- Accepts all package agreements automatically
- 0 = Success
- 1 = Failure (system requirements not met)
[ SYSTEM CHECK ]
--------------------------------------------------------------
Windows Version : 10.0.22631
Product Type : Workstation
Requirements met
[ UPGRADE ]
--------------------------------------------------------------
Locating winget executable...
Running winget upgrade --all...
[Upgrade output...]
Upgrade completed
[ LOG CLEANUP ]
--------------------------------------------------------------
Cleaning up logs older than 14 days...
Cleanup completed
[ FINAL STATUS ]
--------------------------------------------------------------
Result : SUCCESS
Log file : C:\Windows\temp\winget-upgrade-log_2024-12-01.txt
[ SCRIPT COMPLETED ]
--------------------------------------------------------------
- 2024-12-01 v1.0.0 - Initial release - migrated from SuperOps
- View Script Source
- Scripts - Back to script index