Skip to main content

Install Winget Using Powershell Hot 🔥

This command will install the Microsoft App Store, which includes Winget. 4. : Once the installation is complete, run the command winget --version again to verify that Winget is installed correctly.

Install-Module -Name Microsoft.WinGet.Client -Force

$url = "https://aka.ms/getwinget" $file = "$env:TEMP\winget.msixbundle" Invoke-WebRequest -Uri $url -OutFile $file Add-AppxPackage $file Remove-Item $file Use code with caution. Copied to clipboard

: Before running the script, you need to change the PowerShell execution policy for the current session only. This is a temporary bypass that does not affect system-wide security settings: install winget using powershell hot

# Define download URLs for Winget and its required dependencies $urls = @( "https://github.com", "https://aka.ms", "https://github.com" ) # Download each package to the temporary directory $localPaths = foreach ($url in $urls) $fileName = Split-Path $url -Leaf $localPath = Join-Path $env:TEMP $fileName Write-Host "Downloading $fileName..." -ForegroundColor Cyan Invoke-WebRequest -Uri $url -OutFile $localPath $localPath # Install dependencies first (VCLibs and UI Xaml) Write-Host "Installing dependencies..." -ForegroundColor VisualStudio Add-AppxPackage -Path $localPaths[1] Add-AppxPackage -Path $localPaths[2] # Install the main Winget bundle Write-Host "Installing Winget App Installer..." -ForegroundColor Green Add-AppxPackage -Path $localPaths[0] Write-Host "Installation process complete!" -ForegroundColor Gold Use code with caution.

$API_URL = "https://api.github.com/repos/microsoft/winget-cli/releases/latest" $DOWNLOAD_URL = $(Invoke-RestMethod $API_URL).assets.browser_download_url | Where-Object $_.EndsWith(".msixbundle") # Download and Install Invoke-WebRequest -URI $DOWNLOAD_URL -OutFile winget.msixbundle -UseBasicParsing Add-AppxPackage winget.msixbundle # Clean up Remove-Item winget.msixbundle Use code with caution. Copied to clipboard 🚀 Why use WinGet?

This is the most reliable way to ensure all dependencies (like the VCLibs) are installed alongside the client. PowerShell as Administrator. This command will install the Microsoft App Store,

irm asheroto.com/winget | iex

: Type "App Installer" in the search bar and press Enter

To help optimize this deployment for your environment, please share: Install-Module -Name Microsoft

:

💡 : Open PowerShell and run winget -v . If you see a version number, you're already set! If you get an error indicating winget isn't recognized, proceed with the installation methods below.