Install Winget Using Powershell Updated 【2025-2027】
Open PowerShell as Administrator and run:
winget --version
Note: Winget is bundled with the App Installer package on Windows 10 (1809+) and Windows 11. But older systems or certain enterprise images may lack it.
If the above fails due to TLS or API restrictions, you can launch the Store install via PowerShell:
Start-Process "ms-windows-store://pdp/?productid=9NBLGGH4NNS1"
This opens the App Installer page. Click Install manually. Once done, Winget becomes available. install winget using powershell updated
For enterprise environments managing many machines, you can use PowerShell DSC:
Configuration InstallWinget Import-DscResource -ModuleName 'PSDesiredStateConfiguration'Script InstallAppInstaller GetScript = return @ Result = $false SetScript = # Download and install logic from Method 2 $url = "https://aka.ms/getwinget" Invoke-WebRequest -Uri $url -OutFile "$env:TEMP\winget.msixbundle" Add-AppxPackage -Path "$env:TEMP\winget.msixbundle" TestScript = return (Get-Command winget -ErrorAction SilentlyContinue) -ne $null
Updating Winget is often simpler than installing it from scratch because once Winget exists, you can use Winget to update itself – but there’s a catch. Winget cannot update itself while it is in use. Microsoft provides an official PowerShell script to handle this.
Run the following script to download and apply the latest Winget update:
# Fetch latest release info from GitHub
$latestRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/microsoft/winget-cli/releases/latest"
$bundleUrl = ($latestRelease.assets | Where-Object $_.name -like "*.msixbundle" ).browser_download_url
Add-AppxPackage -Path $tempFile -ForceApplicationShutdown Note: Winget is bundled with the App Installer
New-Item -Path "$env:TEMP\winget-install" -ItemType Directory -Force
Set-Location "$env:TEMP\winget-install"
Before running any PowerShell commands, verify these items:
To check your current PowerShell version:
$PSVersionTable.PSVersion
If you don’t have PowerShell 7, you can install it from GitHub or via the Microsoft Store. If the above fails due to TLS or