A multithreaded PowerShell script designed to automate bulk software installation and updates on Windows using Windows Package Manager (winget) driven by a simple CSV manifest.
- Parallel Status Checks: Scans installed applications and available repository updates concurrently across multiple background workers.
- Safe Sequential Execution: Runs
wingetinstallation and upgrade setups one at a time to prevent resource contention or installer conflicts. - Interactive Live Dashboard: Features a real-time terminal UI displaying task progress bars (Check, Action, and Total), timer metrics (Elapsed & ETA), live status updates per app, and a bottom panel streaming output directly from
winget. - Automatic Administrator Elevation: Prompts for required UAC administrator rights seamlessly at launch.
- Automatic Retry Mechanism: Handles transient network/installer glitches by automatically retrying failed installations up to a configurable threshold.
- Detailed Audit Logging: Outputs operational events and detailed error stream capture to
appsRefresh.log.
- Windows 10 / 11 or Windows Server 2019/2022
- PowerShell 5.1 or PowerShell 7+
- Windows Package Manager (
winget) (installed via App Installer from the Microsoft Store) - Administrator privileges (the script handles auto-elevation if required)
Keep the script and your CSV list in the same folder:
📁 appsRefresh/
├── 📄 appsRefresh.ps1
└── 📊 apps.csv
Create or edit apps.csv. The file must contain a header with the column AppID:
AppID
Git.Git
7zip.7zip
Google.Chrome
VideoLAN.VLC
Microsoft.VisualStudioCodeTip: You can find exact package IDs using
winget search <appname>.
Open PowerShell and run the script:
.\appsRefresh.ps1If launched without Administrator privileges, the script will request UAC elevation automatically.
| Parameter | Type | Default | Description |
|---|---|---|---|
-CsvPath |
string |
.\apps.csv |
Path to the target CSV file containing the AppID list. |
-CheckWorkers |
int |
2 |
Number of parallel worker threads used during the check phase. |
-ActionRetries |
int |
2 |
Number of automatic retries attempted for failed installs/upgrades. |
Custom CSV Path:
.\appsRefresh.ps1 -CsvPath "C:\Deployment\software.csv"Faster Parallel Checks:
.\appsRefresh.ps1 -CheckWorkers 4Custom Retries & Worker Settings:
.\appsRefresh.ps1 -CsvPath ".\my_apps.csv" -CheckWorkers 4 -ActionRetries 3- Pre-Flight Inspection: Validates environment requirements (
wingetexistence, CSV existence, header format) and previews the target application list. - Parallel Check Phase: Launches
$CheckWorkersbackground threads to execute non-destructivewinget listandwinget showcommands to identify installed versions vs. available updates. - Sequential Action Phase: Filters applications that need action (
InstallorUpdate) and queues them into a sequential pipeline execution engine. - Live Terminal UI: Renders a custom live console dashboard showing progress percentages, elapsed time (EL), estimated time remaining (ETA), and active task states.
- Final Summary Report: Displays a detailed breakdown of results (
Total evaluated,Up to date,Newly installed,Updated,Failed).
- Error
0x8a15000f(wingetsource error): Ifwingetfails to resolve sources, register the default source package manually:Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.Winget.Source_8wekyb3d8bbwe
- Execution Policy Restriction:
If script execution is disabled on your system, launch with:
powershell -ExecutionPolicy Bypass -File .\appsRefresh.ps1