- Install winget-cli straight from PowerShell
- Always gets the latest version of
winget - Works on Windows 10, Windows 11, Server 2022
- WinGet (and therefore this script) requires "Windows 10 version 1809 or newer (LTSC included)"
- Does not work on Server 2019
-
Latest version of Microsoft.UI.Xaml is downloaded and installed.
-
Processor architecture is determined for prerequisites
-
VCLibs is installed straight from the appx package
-
Xaml is installed by downloading the nupkg, extracting it, and installing the appx package
-
winget-cli is then installed
-
User PATH variable is adjusted to include WindowsApps folder
-
Grabs the latest version of winget on each run
- In PowerShell, type
Install-Script winget-install -Force- answer Yes to all prompts if asked
Note:
-Forceis optional, but it will force the script to update if it is outdated.
The script is published on PowerShell Gallery under winget-install.
If you want to trust PSGallery so you aren't prompted each time you run this command, you can type...
Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted- Download
winget-install.ps1 - Run the script with
.\winget-install.ps1
In PowerShell, type
winget-install- winget-install.ps1
- Unsigned script in the repo, signed script in releases
- If you receive an error message about the Appx module not being loaded, try using a different version of PowerShell (version 6 and 7 seem to be buggy still, but the native PowerShell version in Windows works)
- Open an issue if you run into a persistant problem.
If you're like to help develop this project: fork the repo. 😊
