Wednesday, July 8, 2026

winget update and all that jazz

If you find yourself longing for the command line and want to update all the stuff, this may fulfill your CLI needs.

 powershell

# 1. Force the use of TLS 1.2 for secure asset downloading
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

# 2. Download and install the Winget bootstrap script from PowerShell Gallery
Install-Script -Name winget-install -Force

# 3. Run the installer script to download winget and its required libraries
winget-install -Force

(Sometimes you need to run this:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass)

Restart your PowerShell to refresh your environment path variables.

# 4. Run this command to update
winget upgrade --all

Server 2019
If you want to do this for Server 2019, follow this modified solution.

# 1. Bypass the execution policy for this session Set-ExecutionPolicy Bypass -Scope Process -Force # 2. Force TLS 1.2 to download files securely [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 # 3. Download and register the specialized installation script Install-Script -Name winget-install -Force winget-install -Force


Because Server 2019 lacks the execution aliases, you must add the hidden
system folder where winget.exe is deployed directly to your environment path.
Run this block in the same PowerShell window

# Locate the installed application folder and add it to the system PATH $ResolveWingetPath = Resolve-Path "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe" if ($ResolveWingetPath) { $WingetPath = $ResolveWingetPath[-1].Path $SystemEnvPath = [System.Environment]::GetEnvironmentVariable('PATH', 'Machine') if ($SystemEnvPath -notlike "*$WingetPath*") { setx /M PATH "$SystemEnvPath;$WingetPath" } }
Now,
Close your current PowerShell window completely and open a new one to reload the paths.
# 4. winget upgrade --all

winget update and all that jazz

If you find yourself longing for the command line and want to update all the stuff, this may fulfill your CLI needs.   powershell # 1. Force...