A lightweight PowerShell module that wraps winget upgrade --include-unknown with interactive package exclusion management, license agreement passthrough, selective updates, and concise status summaries under the primary alias wgu.
- Primary Alias (
wgu): Quickly run update checks with a single short command. --include-unknownSupport: Detects upgrades for packages whose currently installed version string is unknown/untracked by WinGet.- Interactive Exclusion Management: Easily exclude software (e.g. pinned versions) by Package ID or wildcard pattern.
- Interactive Menu: Choose to upgrade all packages, select specific item numbers, edit exclusions, or exit (pressing
Enterdefaults to Cancel). - License Agreement Passthrough: License terms and source agreements output directly to your console, allowing standard interactive approval.
- Persistent Storage: Exclusions automatically persist in
%LOCALAPPDATA%\WinGetUpdate\exclusions.json.
Warning
Important Security Notice: The PowerShell scripts in this repository are unsigned. Executing downloaded scripts from the internet can be dangerous. You should always review and audit the source code before blindly proceeding or importing unsigned modules into your environment.
When downloading files from GitHub, Windows often attaches a "Zone.Identifier" (Mark-of-the-Web) attribute, which causes PowerShell to block execution. Additionally, restricted PowerShell ExecutionPolicy settings may prevent unsigned scripts from loading.
After extracting or downloading the repository, unblock the files by running:
# Unblock all module files recursively
Get-ChildItem -Path "$HOME\Documents\PowerShell\Modules\WinGetUpdate" -Recurse | Unblock-File(Alternatively: Right-click the .psd1 / .psm1 files in File Explorer → select Properties → check Unblock → click Apply.)
If PowerShell prevents running scripts altogether, set your execution policy to allow RemoteSigned scripts for the current user:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserClone the repository or download and extract the release .zip into your user PowerShell modules directory:
Windows PowerShell / PowerShell 7:
# Create module folder if it doesn't exist
New-Item -ItemType Directory -Path "$HOME\Documents\PowerShell\Modules\WinGetUpdate" -Force
# Option A: Clone repository into the Modules directory
git clone https://github.com/hoakerk/WinGetUpdate.git "$HOME\Documents\PowerShell\Modules\WinGetUpdate"
# Option B: Or download source ZIP, extract, and copy contents into:
# $HOME\Documents\PowerShell\Modules\WinGetUpdate\Once placed in $HOME\Documents\PowerShell\Modules\, PowerShell auto-loads the module so wgu is available in every session.
If you prefer keeping the repo in a custom folder, import it in your profile:
- Open your profile in a text editor:
notepad $PROFILE - Add the import command (adjust path to where you cloned the repo):
Import-Module "C:\Path\To\WinGetUpdate\WinGetUpdate.psd1"
- Reload your profile:
. $PROFILE
Import-Module ".\WinGetUpdate.psd1" -Forcewgu[Y] Proceed: Upgrades all available non-excluded packages usingwinget upgrade --id <Id> --include-unknown.[S] Select: Lets you enter comma-separated numbers (e.g.,1,3,5) to upgrade only specific packages.[E] Exclusions: Opens the exclusion sub-menu.[N] Cancel (Default): Exits the menu. Pressing Enter defaults to Cancel.
View available and excluded updates without triggering the interactive prompt:
Invoke-WinGetUpdate -ListOnlyExclusions prevent specific packages from being upgraded automatically.
# By exact Package ID
wgu-add "Microsoft.Edge"
# Or using wildcards
wgu-add "*Chrome*"
# Standard Cmdlet syntax
Add-WinGetExclusion -Pattern "Google.Chrome"wgu-list
# or
Get-WinGetExclusionwgu-remove "Microsoft.Edge"
# or
Remove-WinGetExclusion -Pattern "Microsoft.Edge"Exclusions are saved as JSON at:
%LOCALAPPDATA%\WinGetUpdate\exclusions.json
| Cmdlet | Alias | Description |
|---|---|---|
Invoke-WinGetUpdate |
wgu |
Runs update check and opens interactive menu |
Get-WinGetExclusion |
wgu-list |
Lists all active exclusion patterns |
Add-WinGetExclusion |
wgu-add |
Adds a package ID or pattern to exclusions |
Remove-WinGetExclusion |
wgu-remove |
Removes a package ID or pattern from exclusions |
This project was built and refactored with the assistance of the following AI models via Antigravity:
- Claude 3.7 Sonnet / Claude 4.6 (Thinking) – Architecture design, initial implementation, refactoring, and code simplification.
- Gemini 3.6 Flash – Fine-tuning, formatting, documentation updates, and repository preparation.
MIT License. Feel free to contribute or adapt for your needs!
