Install Winget Using Powershell Updated Best Online
The Windows Package Manager (WinGet) is a command-line tool that lets you install, update, and manage software with a single command. While Windows 10 and 11 usually include it by default via the Microsoft App Installer, you can manually install or force-update it using PowerShell. 1. Check for Existing Installation Before installing, verify if WinGet is already on your system. Open PowerShell as Administrator. Run the command: winget --version . If you see a version number, you're ready to go! 2. Fast Install via PowerShell Script If WinGet is missing or broken, the fastest way to install it is by downloading the latest release bundle directly from GitHub. powershell $url = "https://github.com" $output = "$env:TEMP\winget.msixbundle" Invoke-WebRequest -Uri $url -OutFile $output Add-AppxPackage -Path $output Use code with caution. Copied to clipboard Step 1: Fetches the latest .msixbundle URL. Step 2: Downloads the installer to your temporary folder. Step 3: Uses Add-AppxPackage to register the application on your system. 3. Update via Microsoft Store Command Alternatively, you can trigger the Microsoft Store to update the "App Installer" package (which contains WinGet) using the following command: powershell Get-AppxPackage -AllUsers -Name "Microsoft.DesktopAppInstaller" | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} Use code with caution. Copied to clipboard 4. Basic WinGet Usage Tips Once installed, try these common commands to manage your software: Update everything: winget upgrade --all . Search for an app: winget search . Install an app: winget install (e.g., winget install Microsoft.PowerShell ). List installed apps: winget list . 💡 Pro Tip: If you frequently use PowerShell, you can update PowerShell itself using WinGet by running winget upgrade Microsoft.PowerShell . How to update PowerShell | PDQ
How to Install or Update Winget Using PowerShell (2026 Guide) The Windows Package Manager (winget) has become an essential tool for anyone managing software on Windows. Whether you’re a developer, IT admin, or power user, winget lets you install, upgrade, and configure applications directly from the command line. But what if winget is missing from your system? Or worse—what if it’s outdated? In this post, I’ll show you how to install or update winget using PowerShell with the most up-to-date methods for 2026. Before You Begin: Check If Winget Is Already Installed Open PowerShell as Administrator and run: winget --version
If you see a version number (e.g., v1.8.1234 ), winget is installed. If you see 'winget' is not recognized , you need to install it.
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. install winget using powershell updated
Method 1: Install/Update Winget via the Microsoft Store (Recommended) The easiest way is through the App Installer package:
Open the Microsoft Store . Search for App Installer . If you see Update , click it. If it’s not installed, click Install .
PowerShell alternative to trigger the Store update: start ms-windows-store://pdp/?productid=9NBLGGH4NNS1 The Windows Package Manager (WinGet) is a command-line
This opens the App Installer page in the Store. Method 2: Install/Update Winget Using PowerShell (No Store Required) For automation or offline environments, use PowerShell to download and install the latest version directly from GitHub. Step-by-Step PowerShell Script Run the following in an elevated PowerShell session: # 1. Get the latest App Installer download URL from GitHub $githubApi = "https://api.github.com/repos/microsoft/winget-cli/releases/latest" $release = Invoke-RestMethod -Uri $githubApi 2. Find the .msixbundle asset $asset = $release.assets | Where-Object { $_.name -like "*.msixbundle" } if (-not $asset) { Write-Error "No .msixbundle asset found." exit 1 } 3. Download the bundle $downloadUrl = $asset.browser_download_url $outputPath = "$env:TEMP\winget.msixbundle" Invoke-WebRequest -Uri $downloadUrl -OutFile $outputPath 4. Install/update using Add-AppxPackage Add-AppxPackage -Path $outputPath 5. Clean up Remove-Item -Path $outputPath -Force Write-Host "Winget installed/updated successfully!" -ForegroundColor Green
Verify the update winget --version
Method 3: Using the Official Microsoft Desired State Configuration (DSC) 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 } } Check for Existing Installation Before installing, verify if
}
Troubleshooting Common Winget Installation Issues | Issue | PowerShell Fix | |--------|----------------| | Add-AppxPackage fails | Enable developer mode or sideloading: Add-AppxPackage -AllowUnsigned | | Winget not in PATH | Log off/on or restart shell after installation | | Access denied | Run PowerShell as Administrator | | Missing dependencies | Ensure Windows Update is running; winget requires VCLibs and UI.Xaml | Pro Tip: Keep Winget Auto-Updated Instead of manually updating, schedule a monthly task via PowerShell: $action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-Command `"& { iwr https://aka.ms/getwinget -OutFile $env:TEMP\winget.msixbundle; Add-AppxPackage -Path $env:TEMP\winget.msixbundle }`"" $trigger = New-ScheduledTaskTrigger -Monthly -Days 1 Register-ScheduledTask -TaskName "UpdateWinget" -Action $action -Trigger $trigger -RunLevel Highest

No Comments Yet