Interactive WinGet Updates PowerShell Code

title: Contents 
style: nestedList # TOC style (nestedList|inlineFirstLevel)
minLevel: 1 # Include headings from the specified level
maxLevel: 4 # Include headings up to the specified level
includeLinks: true # Make headings clickable
debugInConsole: false # Print debug info in Obsidian console

Overview

Sources:

This note showcases using the PowerShell Module WingetTools by jdhitsolutions to implement an interactive way to display upgradeable WinGet packages on a Windows machine, select the packages to update/upgrade, and invoke the updates.

Code Snippets

Dependencies:

  • WinGet and PowerShell (Core)
  • PowerShellGet or PSResourceGet
  • Microsoft.PowerShell.ConsoleGuiTools for Out-ConsoleGridView Function
  • WingetTools Module

Installation

Install from the PowerShell Gallery using a method from below.

Installation Methods:

# Install via PowerShellGet
Install-Module WingetTools -Scope CurrentUser -Force
 
# Install via PSResourceGet
Install-PSResource WingetTools -Scope CurrentUser -Force
 
# Import into Current Session
Import-Module WingetTools
 
# Test Getting Help for a Function
Get-Help Get-WGUpgrade -Full

Usage

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

Details

About

This note is about …

See Also


Appendix

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

LIST FROM [[PowerShell - Interactive WinGet Updates]] AND -"CHANGELOG" AND -"04-RESOURCES/Code/PowerShell/PowerShell - Interactive WinGet Updates"

(c) No Clocks, LLC | 2024