20 December 2021

Installing WinGet via PowerShell

 I wanted to install Winget via PowerShell in an automated process. The first thing I did was to go to the Winget GitHub site and select the latest version of the Windows Package Manager. Under the latest version page, I clicked on the file with the extension of msixbundle and downloaded it to my machine.

Now that it is on your machine, you can automate the installation with a PowerShell one-liner script where the PS1 file resides in the same directory as the Winget installer. The script will search the current directory for a msixbundle file with the cmdlet listed below. 

 Add-AppPackage -Path ((Get-ChildItem -Path ((Get-Location).ProviderPath) -Filter *.msixbundle).FullName)  

0 comments:

Post a Comment