Verification
After running any of the above, restart your PowerShell session and type: powershell winget --version Use code with caution. Copied to clipboard Why use PowerShell for this? Automation : It allows for "headless" setups on new Windows machines. Bypassing UI
WinGet is a package manager for Windows. It helps you find apps. It installs apps for you. It updates apps automatically. It saves you a lot of time. Step 1: Open PowerShell You must open PowerShell as an administrator. Right-click the Windows Start button. Click on or PowerShell (Admin) . Click Yes on the pop-up box. Step 2: Check for WinGet
, it remains the gold standard for "zero-touch" software management on Windows. install winget using powershell hot
To install (Windows Package Manager) using PowerShell, you can use the Add-AppxPackage cmdlet to install the .msixbundle package directly from Microsoft's servers. While WinGet is pre-installed on modern versions of Windows 10 (1809+) and Windows 11 , manual installation is often necessary for Windows Server or "clean" installs where the Microsoft Store is absent. Quick Install Commands
# Run as Administrator $hasWinget = Get-Command winget -ErrorAction SilentlyContinue if (-not $hasWinget) Write-Host "winget not found. Downloading App Installer package..." -ForegroundColor Yellow $url = "https://aka.ms/getwinget" $downloadPath = "$env:TEMP\Microsoft.DesktopAppInstaller.msixbundle" Invoke-WebRequest -Uri $url -OutFile $downloadPath Add-AppxPackage -Path $downloadPath Write-Host "winget installed. Restart PowerShell." -ForegroundColor Green else Write-Host "winget already available." -ForegroundColor Green
Add-AppxPackage -Path "VCLibs.appx" Add-AppxPackage -Path "UiXaml.appx" Add-AppxPackage -Path "Winget.msixbundle" Use code with caution. Troubleshooting Common Errors "The term 'winget' is not recognized" Verification After running any of the above, restart
Get-AppxPackage -Name Microsoft.DesktopAppInstaller | Remove-AppxPackage
To install WinGet via PowerShell, you can use a one-line command to download the installer directly from Microsoft and execute it . This is particularly useful if the Microsoft Store is unavailable or if you need to automate the setup on multiple machines.
Install-PackageProvider -Name NuGet -Force Install-Module -Name Microsoft.WinGet.Client -Force -Repository PSGallery Use code with caution. Copied to clipboard Run the repair/bootstrap command: powershell Repair-WinGetPackageManager -AllUsers Use code with caution. Copied to clipboard -IncludePrerelease if you need the latest preview version. Microsoft Learn Method 2: Register via App Installer (Fast Fix) Bypassing UI WinGet is a package manager for Windows
Once the installation is complete, verify that Winget is working by running the following command:
Right-click and select Run as administrator . Step 2: Run the Installation Script
Get-AppxPackage -AllUsers DesktopAppInstaller | Foreach Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"