Install Winget Using Powershell ✔
Use WinGet to install and manage applications | Microsoft Learn
Once winget is installed, your life becomes simpler:
The Windows Package Manager (winget) is a command-line tool designed to automate the installation, upgrade, configuration, and removal of applications on Windows 10 and Windows 11. While modern versions of Windows include winget by default, legacy systems, Windows Server editions, or "Lite" installations often lack this utility. This paper outlines the methods to programmatically install winget using PowerShell, enabling system administrators to standardize environment provisioning and automate software deployment pipelines. install winget using powershell
This method manually fetches the latest installer and registers it with the system.
And replicate that state on a new machine: Use WinGet to install and manage applications |
Microsoft maintains the aka.ms/getwinget redirect to always point to the latest stable version of the App Installer.
Invoke-WebRequest -Uri https://aka.ms/getwinget -OutFile winget.msixbundle Use code with caution. Copied to clipboard : powershell Add-AppxPackage winget.msixbundle Use code with caution. Copied to clipboard Clean up : powershell Remove-Item winget.msixbundle Use code with caution. Copied to clipboard Troubleshooting and Verification This method manually fetches the latest installer and
try Select-Object -First 1
winget --version
For environments like Windows Server where dependencies (like UI XAML) might be missing, a specialized installer script can automate the process.
October 26, 2023 Subject: System Administration, Configuration Management Audience: System Administrators, Power Users, DevOps Engineers
