repoRefresh is a multi-threaded PowerShell automation tool designed to keep an offline software repository (installers, executables, MSIs, offline bundles) synchronized with the latest package releases available via winget.
It features a real-time terminal dashboard, multi-worker parallel execution for both metadata analysis and package downloads, automatic retry policies, and granular directory structure mapping.
- Multi-Worker Analysis: Parallel querying of
wingetrepositories to quickly identify outdated or missing packages. - Concurrent Downloads: Asynchronous parallel file downloads powered by thread-safe background runspaces.
- Smart Idempotency: Automatically skips re-downloading installer files if the exact target version is already present on disk.
- Dynamic Live Terminal UI: Real-time progress bars, speed metrics, window resize compensation, and active task tracking.
- Auto-Retry Mechanism: Configurable retries for transient download or network failures.
- Flexible Path Structure: Organize installers into custom folder hierarchies defined in a single CSV file.
- Windows 10 / 11 (or Windows Server with
wingetinstalled) - PowerShell 5.1 or PowerShell Core (7.x+)
- winget (Windows Package Manager) installed and available in system
PATH(included with App Installer on Windows).
Create or edit apps.csv in the script directory (or pass a custom path via parameter). The CSV requires two mandatory headers: AppID and FolderPath.
AppID,FolderPath
Git.Git,Developer\Git
Microsoft.VisualStudioCode,Developer\VSCode
VideoLAN.VLC,Media\VLC
7zip.7zip,Utilities\7Zip- AppID: The exact package ID from
winget(e.g.,Git.Git). - FolderPath: Subfolder relative to
-BasePathwhere the installer will be stored.
.\repoRefresh.ps1 -BasePath "C:\Repository\Software"| Parameter | Default Value | Description |
|---|---|---|
-BasePath |
C:\D\rb\GoogleDrive\software-tier-1 |
Root folder where installer files will be downloaded and structured. |
-CsvPath |
.\apps.csv |
Path to the CSV mapping file. |
-AnalysisWorkers |
2 |
Number of concurrent threads evaluating winget repository status. |
-DownloadWorkers |
3 |
Number of parallel download threads. |
-DownloadRetries |
2 |
Number of retry attempts per package upon download failure. |
.\repoRefresh.ps1 `
-BasePath "D:\SoftwareArchive" `
-CsvPath "C:\Configs\my_apps.csv" `
-AnalysisWorkers 4 `
-DownloadWorkers 5 `
-DownloadRetries 3If winget throws source or package registration errors (e.g., 0x8a15000f), re-register the Winget source package in PowerShell:
Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.Winget.Source_8wekyb3d8bbwe