Powershell Updated | Install Winget Using
The same script used for installation will also install a newer version over an existing one. PowerShell’s Add-AppxPackage handles version upgrades seamlessly.
| Error | Solution |
|-------|----------|
| Add-AppxPackage : Deployment failed | Another user has the package. Use -ForceUpdateFromAnyVersion |
| Invoke-RestMethod : The response content cannot be parsed | Check your internet / proxy settings. Use [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 before the Invoke call |
| winget is not recognized | Close and reopen PowerShell as Admin. Or add %USERPROFILE%\AppData\Local\Microsoft\WindowsApps to your PATH |
| Access Denied | You are not running PowerShell as Administrator |
| Package repository is corrupt | Run winget source reset --force |
winget --version
winget search git
Starting with Winget 1.5 and later, Microsoft introduced a winget upgrade command that sometimes can upgrade the package manager itself:
winget upgrade Microsoft.AppInstaller
However, this is not always reliable because the App Installer package is often protected. For a guaranteed update, always use the GitHub .msixbundle method shown in Step 3.
Installing App Installer (which includes ) via PowerShell is the most reliable way to set up package management on Windows 10 and 11, especially on systems without Microsoft Store access. 1. Check for Existing Installation Before starting, verify if is already on your system. Open PowerShell and run: powershell winget --version Use code with caution. Copied to clipboard
If you see a version number, you're all set. If you get an "ObjectNotFound" error, proceed with the steps below. 2. Download the Latest Release You need the .msixbundle file and its required dependencies from the official Microsoft Winget GitHub repository
Run the following script to download the latest stable version directly to your Downloads folder: powershell
$url = (Invoke-RestMethod https://github.com).assets | Where-Object $_.name -like "*.msixbundle"
| Select-Object -ExpandProperty browser_download_url Invoke-WebRequest -Uri $url -OutFile
"$env:USERPROFILE\Downloads\Microsoft.DesktopAppInstaller.msixbundle" Use code with caution. Copied to clipboard 3. Install Dependencies
requires specific VCLibs and Framework packages to run. If these are missing, the installation will fail. Run this block to ensure they are present: powershell # Download VCLibs Invoke-WebRequest -Uri "https://aka.ms" "$env:USERPROFILE\Downloads\VCLibs.appx" # Install VCLibs Add-AppxPackage -Path "$env:USERPROFILE\Downloads\VCLibs.appx" Use code with caution. Copied to clipboard 4. Run the Installation Now, install the main package you downloaded in Step 2: powershell Add-AppxPackage -Path
"$env:USERPROFILE\Downloads\Microsoft.DesktopAppInstaller.msixbundle" Use code with caution. Copied to clipboard 5. Verify the Setup
Restart your PowerShell session to refresh the environment variables. Test the installation by searching for a common app: powershell winget search powertoys Use code with caution. Copied to clipboard Troubleshooting Tips Execution Policy
: If the scripts won't run, set your policy to bypass for the session: Set-ExecutionPolicy Bypass -Scope Process Admin Rights : Always run PowerShell as an Administrator to ensure the Add-AppxPackage command has the necessary permissions. Store Update : If you have access to the Microsoft Store, simply running
Get-AppxPackage -AllUsers -Name "Microsoft.DesktopAppInstaller" | Update-AppxPackage is a faster alternative for existing installs. into a single clickable
To install and update (Windows Package Manager) using PowerShell, use the official Microsoft.WinGet.Client
. This is the most reliable method for modern systems, including Windows 10, 11, and Windows Sandbox Microsoft Learn 🛠️ Quick Installation (The "Modern" Way) Run these commands in an Administrative PowerShell Install the WinGet Client module: powershell
Install-Module -Name Microsoft.WinGet.Client -Force -Repository PSGallery Use code with caution. Copied to clipboard Bootstrap/Repair the WinGet executable: powershell Repair-WinGetPackageManager -AllUsers Use code with caution. Copied to clipboard Verify the installation: powershell winget --version Use code with caution. Copied to clipboard 📦 Alternative Manual Method (Direct Download)
If the module method fails or you are on a restricted system, you can manually download and install the package bundle directly from Microsoft's servers Stack Overflow powershell # Download the latest bundle Invoke-WebRequest -Uri "https://aka.ms/getwinget" "winget.msixbundle" # Install the package Add-AppxPackage winget.msixbundle # Clean up Remove-Item winget.msixbundle Use code with caution. Copied to clipboard 🔄 How to Update WinGet WinGet typically updates itself via the Microsoft Store
(as the "App Installer"). However, you can force an update through PowerShell Update All Apps (Including WinGet): powershell winget upgrade --all Use code with caution. Copied to clipboard Update via PowerShell Module: If you used the Microsoft.WinGet.Client
module, simply run the repair command again to pull the latest stable version: powershell Repair-WinGetPackageManager Use code with caution. Copied to clipboard ⚠️ Common Troubleshooting Missing Dependencies: On older systems or Windows Server, WinGet requires Microsoft UI Xaml Microsoft Learn Repair-WinGetPackageManager cmdlet usually handles these automatically Path Issues:
isn't recognized after installation, restart your PowerShell session or your computer to refresh environment variables PowerShell Gallery Execution Policy: If you can't run scripts, set the policy temporarily: powershell Set-ExecutionPolicy RemoteSigned -Scope Use code with caution. Copied to clipboard Export a list of your current apps to a "winget import" file. Set up a scheduled task to keep all your software updated daily. Configure settings like progress bar styles or experimental features.
Use WinGet to install and manage applications | Microsoft Learn
Installing the Windows Package Manager (Winget) via PowerShell is the most efficient way to manage software on Windows 10 and 11. While Winget typically comes pre-installed via the App Installer, it can sometimes be missing, outdated, or corrupted.
This guide provides the updated, step-by-step process to manually install or repair Winget using PowerShell. Prerequisites
Before starting, ensure your system meets these requirements: OS: Windows 10 (version 1809 or later) or Windows 11. Permissions: You must run PowerShell as an Administrator.
Internet: An active connection to download the necessary packages from GitHub. Step 1: Open PowerShell as Administrator
To make changes to system packages, you need elevated privileges. Press the Windows Key. Type PowerShell.
Right-click Windows PowerShell and select Run as Administrator. Step 2: Check for Existing Installation
First, verify if Winget is already installed or if it just needs an update. Type the following command:winget --version If a version number appears: You already have it.
If you see "The term 'winget' is not recognized": Proceed with the installation steps below. Step 3: Install Winget via PowerShell
Since Winget is distributed as part of the Microsoft App Installer, we will download the latest bundle directly from the official Microsoft GitHub repository. 1. Download the Latest Release install winget using powershell updated
Copy and paste this script into your PowerShell window to fetch the latest installer: powershell
$repo = "microsoft/winget-cli" $url = "https://github.com" $asset = Invoke-RestMethod -Uri $url | Select-Object -ExpandProperty assets | Where-Object $_.name -like "*.msixbundle" $downloadUrl = $asset.browser_download_url Invoke-WebRequest -Uri $downloadUrl -OutFile "$env:TEMP\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" Use code with caution. 2. Install the Package
Once the download is complete, run the installation command: powershell
Add-AppxPackage -Path "$env:TEMP\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" Use code with caution. Step 4: Install Dependencies (If Needed)
Winget requires specific UI frameworks to function. If the installation fails with a "missing dependency" error, run these commands to install the VCLibs: powershell
$vclibsUrl = "https://aka.ms" Invoke-WebRequest -Uri $vclibsUrl -OutFile "$env:TEMP\VCLibs.appx" Add-AppxPackage -Path "$env:TEMP\VCLibs.appx" Use code with caution. Step 5: Verify the Installation Restart your PowerShell session and type:winget --version You should now see the current version (e.g., v1.7.10861).
💡 Quick Start Tip: Try searching for an app immediately by typing winget search vlc. Troubleshooting Common Issues 404 Not Found
If the script fails to download, the GitHub API might be rate-limited or the naming convention has changed. You can manually download the .msixbundle from the official Winget GitHub Releases page. Execution Policy Error
If PowerShell blocks the script, run this command and try again:Set-ExecutionPolicy RemoteSigned -Scope Process App Installer Not Updating
If the Store version is stuck, you may need to reset the App Installer via:Get-AppxPackage Microsoft.DesktopAppInstaller | Reset-AppxPackage Why Use Winget? Automation: Install dozens of apps with one command.
Updates: Run winget upgrade --all to update every app on your PC at once.
Cleanliness: No more hunting for .exe or .msi files on sketchy websites.
If you'd like to know more about using Winget, tell me if you're interested in: Bulk installation scripts for new PC setups. Exporting your current app list to a backup file. Uninstalling stubborn bloatware using Winget commands.
Installing WinGet (Windows Package Manager) via PowerShell is the most efficient way to skip the Microsoft Store and automate your setup.
While modern Windows versions usually include it, you can force-install or repair it with these updated methods. 1. The Quick "One-Liner" (GitHub Release)
This script fetches the latest version directly from Microsoft’s GitHub and installs it. Open PowerShell as Administrator and run: powershell
$url = (Invoke-RestMethod https://api.github.com/repos/microsoft/winget-cli/releases/latest).assets.browser_download_url | Where-Object $_.EndsWith(".msixbundle") Invoke-WebRequest -Uri $url -OutFile "winget.msixbundle" Add-AppxPackage -Path "winget.msixbundle" Remove-Item "winget.msixbundle" Use code with caution. Copied to clipboard 2. The Official "Repair" Method
If you have the Microsoft.WinGet.Client module, you can use the official "bootstrap" command to install or fix WinGet for all users: powershell
Install-Module -Name Microsoft.WinGet.Client -Force -Repository PSGallery Repair-WinGetPackageManager -AllUsers Use code with caution. Copied to clipboard 3. The "Missing Dependencies" Fix
On older Windows 10 builds, WinGet might fail because it needs specific UI frameworks. Use this if the standard install doesn't work: powershell
# 1. Install VC++ Runtime Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile VCLibs.appx Add-AppxPackage VCLibs.appx # 2. Install UI Xaml 2.8 (Required for newer WinGet) Add-AppxPackage -Path https://cdn.winget.microsoft.com/cache/source.msix Use code with caution. Copied to clipboard Quick Verification Once installed, verify it by typing: powershell winget --version Use code with caution. Copied to clipboard
If you get an error that the command isn't recognized, you might need to enable its App execution alias in Settings > Apps > App execution aliases. Helpful "Interesting" Commands
Now that you have it, here is what makes WinGet "interesting":
Update Everything: winget upgrade --all — Updates all your installed apps at once.
Export Your Setup: winget export -o myapps.json — Saves a list of all your apps to a file.
Import on a New PC: winget import -i myapps.json — Reinstalls all those apps on a fresh Windows install automatically.
Use WinGet to install and manage applications | Microsoft Learn
To install or update (Windows Package Manager) using PowerShell, you can use the official Microsoft.WinGet.Client
module or a direct installation script. While WinGet is typically pre-installed on Windows 10 (1809+) and Windows 11, these methods are useful for Server environments, sandboxes, or repairing broken installations. Microsoft Learn
Option 1: Using the Microsoft.WinGet.Client Module (Recommended)
This is the most "updated" and official programmatic method. It installs the necessary PowerShell module and then uses a repair cmdlet to bootstrap the WinGet client and its dependencies. Open PowerShell as Administrator. Run the following commands: powershell # Install the NuGet provider if not already present Install-PackageProvider -Name NuGet -Force | Out-Null The same script used for installation will also
# Install the WinGet client module from the PowerShell Gallery
Install-Module -Name Microsoft.WinGet.Client -Force -Repository PSGallery | Out-Null
# Bootstrap or repair the WinGet package manager and all dependencies Repair-WinGetPackageManager -AllUsers Use code with caution. Copied to clipboard Option 2: One-Line Installation Script
For a quick setup, community-maintained scripts can automate the download of the .msixbundle
and its dependencies (like UI Xaml and VC++ libs) from GitHub. Run this command in an elevated PowerShell prompt: powershell Install-Script -Name winget-install -Force; winget-install Use code with caution. Copied to clipboard
Note: You may need to set your execution policy to allow scripts first: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Option 3: Manual Install via PowerShell (for Windows Server/IoT)
If you are on a system without the Microsoft Store (like Windows Server 2022), you must manually add the package using Add-AppxPackage Microsoft Learn the latest .msixbundle official WinGet GitHub releases Install it using PowerShell: powershell Add-AppxPackage -Path
"C:\Path\To\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" Use code with caution. Copied to clipboard Microsoft Learn Verification To confirm WinGet is installed and ready, type: powershell winget --version Use code with caution. Copied to clipboard
If successful, it will return the current version number (e.g.,
Once installed, you can keep all your Windows apps (including WinGet itself) updated by running winget upgrade --all
To install WinGet (Windows Package Manager) using PowerShell, the most reliable and updated method involves using the official Microsoft WinGet Client module. This approach is particularly useful for environments like Windows Sandbox, Windows Server, or fresh installations where the Microsoft Store might not be easily accessible. Prerequisites
Operating System: Windows 10 (version 1809 or higher) or Windows 11. Permissions: You must run PowerShell as an Administrator. Installation Steps
Launch PowerShell as AdministratorRight-click the Start button and select Terminal (Admin) or Windows PowerShell (Admin).
Install the WinGet Client ModuleRun the following commands to download the necessary package provider and the WinGet client module from the PowerShell Gallery: powershell
# Set progress preference to speed up installation $progressPreference = 'silentlyContinue' # Install NuGet provider if not present Install-PackageProvider -Name NuGet -Force | Out-Null # Install the official Microsoft WinGet Client module Install-Module -Name Microsoft.WinGet.Client -Force -Repository PSGallery | Out-Null Use code with caution. Copied to clipboard
Bootstrap WinGetUse the built-in repair cmdlet to automatically download and install the latest stable version of WinGet and its dependencies: powershell Repair-WinGetPackageManager -AllUsers Use code with caution. Copied to clipboard
Verify InstallationConfirm WinGet is working by checking its version or running a simple search: powershell winget --version winget search powershell Use code with caution. Copied to clipboard Alternative: Direct One-Line Script
Use WinGet to install and manage applications | Microsoft Learn
Installing Winget using PowerShell: A Step-by-Step Guide (Updated)
As a Windows user, you're likely familiar with the hassle of searching for and downloading software from various websites. However, with the introduction of Winget, a package manager for Windows, you can now easily discover, install, and manage software from a single interface. In this article, we'll walk you through the process of installing Winget using PowerShell, updated for the latest versions.
What is Winget?
Winget is a package manager for Windows that allows you to easily discover, install, and manage software on your system. Developed by Microsoft, Winget provides a unified way to manage software packages, making it easier to keep your system up-to-date and secure. With Winget, you can search for and install software from a vast repository of packages, all from the comfort of your command line or PowerShell.
Prerequisites
Before installing Winget using PowerShell, ensure you meet the following prerequisites:
Installing Winget using PowerShell
To install Winget using PowerShell, follow these steps:
$PSVersionTable.PSVersion
If you're running an earlier version, update PowerShell before proceeding. 3. Install Winget: Run the following command to install Winget:
winget install --self
If you don't have Winget installed, this command will install it for you. If you already have Winget installed, this command will update it to the latest version.
Verify Winget Installation
After installation, verify Winget is working correctly by running: winget --version winget search git
winget --version
This command should display the version of Winget installed on your system.
Configuring Winget
Once Winget is installed, you may want to configure it to suit your needs. Here are a few basic configuration options:
winget source set winget https://api.github.com/repos/microsoft/winget-pkgs
This sets the source to the official Winget package repository.
Using Winget
Now that Winget is installed and configured, you can start using it to manage software on your system. Here are a few basic examples:
winget search <package_name>
Replace <package_name> with the name of the software you're looking for.
winget install <package_name>
Replace <package_name> with the name of the software you want to install.
winget list
This command displays a list of all packages installed on your system using Winget.
Troubleshooting
If you encounter issues during installation or while using Winget, here are a few troubleshooting tips:
winget --debug
This command displays detailed logging information that can help diagnose issues.
winget install --self
This command updates Winget to the latest version.
Conclusion
In this article, we've shown you how to install Winget using PowerShell, updated for the latest versions. With Winget, you can easily discover, install, and manage software on your Windows system. Whether you're a developer, sysadmin, or power user, Winget provides a convenient way to manage software packages, saving you time and effort.
By following the steps outlined in this article, you should now have Winget installed and configured on your system. Happy package managing!
How to Install WinGet Using PowerShell (2026 Update) WinGet (Windows Package Manager) is now a core system component for Windows 10 (version 1809+), Windows 11, and Windows Server 2025. While it usually comes pre-installed via the App Installer from the Microsoft Store, you may need to install or repair it using PowerShell if it is missing or corrupted. Method 1: The Fast Microsoft Repair (Recommended)
This is the modern, programmatic way to bootstrap WinGet using Microsoft's official PowerShell module. It automatically handles dependencies like VCLibs and XAML. Launch PowerShell as Administrator. Run the following commands: powershell
# Install the required NuGet provider Install-PackageProvider -Name NuGet -Force | Out-Null # Install the WinGet client module from PowerShell Gallery Install-Module -Name Microsoft.WinGet.Client -Force -Repository PSGallery | Out-Null # Bootstrap the WinGet client Repair-WinGetPackageManager -AllUsers Use code with caution. Copied to clipboard
Note: Adding -IncludePrerelease to the final command will install the preview version instead. Method 2: Manual MSIX Installation via PowerShell
If the automated module fails or you are in an offline environment, you can manually pull the latest bundle from the WinGet GitHub Releases. Download the latest .msixbundle: powershell
$url = "https://aka.ms/getwinget" Invoke-WebRequest -Uri $url -OutFile "winget.msixbundle" Use code with caution. Copied to clipboard Install the package: powershell Add-AppxPackage -Path ".\winget.msixbundle" Use code with caution. Copied to clipboard Clean up: powershell Remove-Item ".\winget.msixbundle" Use code with caution. Copied to clipboard Method 3: One-Line Community Installer
For a quick setup that handles all prerequisites (VC++ Redistributables and UI Xaml) in one go, you can use popular community scripts like the winget-install script. Run this command to install immediately: powershell
Invoke-WebRequest https://raw.githubusercontent.com/asheroto/winget-installer/master/winget-install.ps1 -UseBasicParsing | iex Use code with caution. Copied to clipboard Verifying the Installation
Once the process is complete, restart your terminal and type the following to confirm: powershell winget --version Use code with caution. Copied to clipboard
If you see a version number (e.g., v1.9.xxxx), the installation was successful.
Use WinGet to install and manage applications | Microsoft Learn
Installing WinGet (Windows Package Manager) has become significantly easier in modern versions of Windows 10 and 11 because it is now included by default. However, if you are on an older build, have a corrupted installation, or are using Windows Server, you may need to install it manually.
Here is the updated, comprehensive guide on how to install, verify, and troubleshoot WinGet using PowerShell.
| Error | Fix |
|-------|-----|
| Add-AppxPackage fails | Enable Developer Mode: Settings > Update & Security > For developers |
| 0x80073D05 | Install all missing dependencies (VCLibs, UI.Xaml) |
| winget not recognized | Log off / restart, or add %LOCALAPPDATA%\Microsoft\WindowsApps to PATH |
| Windows LTSC | Install App Installer from Store using wsreset -i or manually via .appx |

