Interactive WinGet Updates

Code Properties

  • Language: PowerShell
  • Modules: WingetTools, Microsoft.PowerShell.ConsoleGuiTools

Overview

Sources:

Using the WingetTools PowerShell module to implement an interactive way to display upgradeable WinGet packages, select packages to update, and invoke the updates.

Code

Installation

# install via PowerShellGet
Install-Module WingetTools -Scope CurrentUser -Force
 
# install via PSResourceGet
Install-PSResource WingetTools -Scope CurrentUser -Force
 
# install console GUI tools for interactive selection
Install-Module Microsoft.PowerShell.ConsoleGuiTools -Scope CurrentUser -Force
 
# import into current session
Import-Module WingetTools
 
# test getting help
Get-Help Get-WGUpgrade -Full

Usage

#Requires -RunAsAdministrator
Get-WGUpgrade | Out-ConsoleGridView -OutputMode Multiple | Invoke-WGUpgrade

Usage

Run as administrator to interactively select and update packages:

# show available updates in interactive grid, select packages to update
Get-WGUpgrade | Out-ConsoleGridView -OutputMode Multiple | Invoke-WGUpgrade
 
# update all packages without interaction
Get-WGUpgrade | Invoke-WGUpgrade

Appendix

Note created on 2024-04-15 and last modified on 2024-12-31.

See Also


(c) No Clocks, LLC | 2024