What is WingetTools
mainwinget command-line tool. It is designed to make winget more 'PowerShell-friendly' by converting command-line output into PowerShell objects that can be manipulated, piped, and used within automation scripts.repository·main·Indexed 41 days ago
https://github.com/jdhitsolutions/wingettoolsA PowerShell module providing a wrapper around the Microsoft winget command-line tool. It converts text-based winget output into structured PowerShell objects to simplify automation, filtering, and package management. Key cmdlets include Get-WGPackage, Get-WGInstalled, Get-WGUpgrade, Invoke-WGUpgrade, and Install-WinGet. Compatible with Windows PowerShell 5.1 and PowerShell 7.x on Windows 10 and 11.
winget command-line tool. It is designed to make winget more 'PowerShell-friendly' by converting command-line output into PowerShell objects that can be manipulated, piped, and used within automation scripts.winget is not available via the Microsoft Store, you can use Install-WinGet to download and install the latest version from GitHub. This command must be executed in a Windows PowerShell session on Windows 10 or Windows 11. It automatically handles the DesktopAppInstaller dependency if it is missing.Install-WinGetWingetTools provides a workflow for managing package upgrades using PowerShell objects.
Get-WGUpgrade to generate a list of packages that have available updates. It outputs custom objects formatted as a table by default.Get-WGUpgrade to a ForEach-Object loop that calls winget.exe upgrade --id <ID>.Get-WGUpgrade directly to Invoke-WGUpgrade. This command is a wrapper that uses the package ID and applies silent install options, automatically accepting all licenses and agreements. It also supports the -WhatIf parameter for safe testing.Install the WingetTools module from the PowerShell Gallery. This module is a PowerShell wrapper around the winget command-line tool, designed to make winget more PowerShell-friendly by converting console output into custom objects.
It works in Windows PowerShell 5.1 and PowerShell 7.x on Windows. Installing this module will also install its dependencies: ThreadJob and psyml.
Install-Module WingetToolsUse the Install-WinGet cmdlet to download and install the latest WinGet release from GitHub. This is useful if WinGet is not yet available to you via the Microsoft Store.
Requirements & Behavior:
Microsoft.VCLibs.140.00.UWPDesktop package. If it is missing, the command will download and install it automatically.Install-WinGetIf winget is not available via the Microsoft Store, you can install the latest version from GitHub.
Requirements:
winget package requires the DesktopAppInstaller package; if not found locally, it will be downloaded and installed automatically.Use the Install-WinGet cmdlet to download and install the latest version of Winget directly from GitHub. This is useful if Winget is not yet available via the Microsoft Store on your system.
Requirements:
Microsoft.VCLibs.140.00.UWPDesktop. If this dependency is missing, the cmdlet will attempt to download and install it automatically.Usage:
Run the command without parameters for a standard installation, or use the -Preview flag to install the latest preview build.
Install-WinGetUse Install-WinGet to install the latest version of the winget command-line tool from GitHub. This is useful if winget is not yet publicly available via the Microsoft Store on your system.
Requirements:
DesktopAppInstaller package (the command will attempt to download and install it if it is missing).Install-WinGetwinget command directly in your terminal. If the native command works but the module command fails, report the issue to the WingetTools GitHub repository: https://github.com/jdhitsolutions/WingetTools/issues.Once you have captured the output of Get-WGInstalled into a variable, you can use the format-table -view update command to quickly identify which installed packages have available updates. This view provides a comparison between InstalledVersion and OnlineVersion, along with a boolean Update flag.
$in | format-table -view updateYou can pipe objects from Get-WGUpgrade directly into Invoke-WGUpgrade. This allows for filtering or interactive selection before performing the upgrade.
Filter and simulate:
Use Get-WGUpgrade with a name filter and pipe to Invoke-WGUpgrade -WhatIf to see what would happen without actually performing the upgrade.
Interactive selection:
Pipe Get-WGUpgrade to Out-GridView -OutputMode Multiple to select specific packages from a GUI window, then pipe those selections to Invoke-WGUpgrade to install only the chosen items.
# Simulate upgrades for packages starting with 'p'
Get-WGUpgrade -Name p* | Invoke-WGUpgrade -WhatIf
# Select specific upgrades via a GUI and then install them
Get-WGUpgrade | Out-GridView -OutputMode Multiple | Invoke-WGUpgradeYou can combine standard winget CLI commands with Get-WGPackage to transform text-based search results into structured PowerShell objects. This is useful for filtering or selecting specific properties from a search result set.
winget search --tag powerbi | Get-WGPackage | Select-Object Name,ID,Version