Install Winget Using Powershell Hot Jun 2026

This script automatically fetches the latest stable version of WinGet, installs necessary VCLibs, and updates your User PATH. Verification After installation, restart your terminal and type: powershell winget --version Use code with caution. Copied to clipboard If successful, it will return the version number (e.g., v1.9.25150 Microsoft Learn all your favorite apps at once?

If you get a "No applicable app packages" error, you need to install the VCLibs dependencies first (see troubleshooting below).

$repo = "microsoft/winget-cli" $releases = "https://github.com" $updates = Invoke-RestMethod -Uri $releases $asset = $updates.assets | Where-Object $_.name -like "*.msixbundle" | Select-Object -First 1 $downloadUrl = $asset.browser_download_url $fileName = $asset.name # Download dependencies Invoke-WebRequest -Uri "https://aka.ms" -OutFile "VCLibs.appx" Invoke-WebRequest -Uri "https://github.com" -OutFile "UiXaml.appx" Invoke-WebRequest -Uri $downloadUrl -OutFile $fileName # Install in order Add-AppxPackage -Path "VCLibs.appx" Add-AppxPackage -Path "UiXaml.appx" Add-AppxPackage -Path $fileName # Clean up installer files Remove-Item "VCLibs.appx", "UiXaml.appx", $fileName Use code with caution.

Bypasses the need for a Microsoft account or the Store app. install winget using powershell hot

winget-install

You are not running PowerShell as Administrator. Right-click PowerShell and select Run as Administrator . The Add-AppxPackage command requires elevated rights to install for all users.

This is the fastest method to ensure WinGet is bootstrapped correctly along with its dependencies. powershell This script automatically fetches the latest stable version

| Parameter | Function | Example Usage | | :--- | :--- | :--- | | | Forces a complete reinstallation, even if Winget is detected. Great for fixing broken installs. | winget-install -Force | | -ForceClose | Attempts to automatically close any processes that might interfere with the installation, increasing the success rate. | winget-install -ForceClose | | -Debug | Runs the script in debug mode, providing detailed output of every action. Essential for troubleshooting. | winget-install -Debug | | -Wait | Pauses the script for a few seconds after it completes. This prevents the PowerShell window from closing automatically so you can review the output. | winget-install -Wait | | -NoExit | Keeps the PowerShell window open after the script finishes, useful for running additional commands afterward. | winget-install -NoExit |

$dir = "$env:TEMP\WinGetInstall" New-Item -ItemType Directory -Force -Path $dir | Out-Null # Download WinGet main package Invoke-WebRequest -Uri $wingetURL -OutFile "$dir\winget.msixbundle" -UseBasicParsing # Download VCLibs dependency Invoke-WebRequest -Uri "https://aka.ms" -OutFile "$dir\vclibs.appx" -UseBasicParsing # Download UI Xaml dependency Invoke-WebRequest -Uri "https://github.com" -OutFile "$dir\uixaml.appx" -UseBasicParsing Use code with caution. Step 5: Install the Packages via Deployment Cmdlets

: You are missing the required Visual C++ or UI Xaml dependencies. If you get a "No applicable app packages"

In many cases, especially on Windows 11, WinGet is already part of the system. However, if it's missing or outdated, updating the "App Installer" in the Microsoft Store will install it. Open the app. Click on Library in the bottom-left corner. Click Get updates . Ensure App Installer is updated. How to Verify Your WinGet Installation

This public link is valid for 7 days and shares a thread, including any personal information you added. This link or copies made by others cannot be deleted. If you share with third parties, their policies apply. Can’t copy the link right now. Try again later.