Skip to content

Winget | Windows Package Manager

Winget is a Package Manager CLI based tool for Windows 10 + Windows 11. Winget makes it possible to manage Application through one central Package Manager, like ‘apt’ known from Linux based systems or Homebrew (brew) from macOS. With this Package Manager you will be able to install/update/discover and remove several Applications even those which are not installed through Winget. Isn’t it cool?

Winget List & Upgrade

For example you could update all (or at least the most!) Applications with a one-liner, at first we are going to list them all –> Of course we are using PowerShell 7 with administrative privileges (you could also use cmd or Windows PowerShell):

PowerShell
winget list

post5_1.png

To get a list of upgradeable Applications:

PowerShell
winget upgrade

And now we saw all Applications, we also saw upgradeable Applications.. and now let magic happen –> the one-liner which I mentioned:

PowerShell
winget upgrade --all

post5_2.png

Winget Search & install applications

How about discovering and installing an Application?:

PowerShell
winget search "7zip"
winget install --id '7zip.7zip'

post5_3.png

Winget information

Time for some sidenotes: Winget CLI is only supported on Windows 10 1709 and later. It comes builtin as a part of the App-Installer with Windows 11 and on the newer releases of Windows 10. You can get Winget also through the Microsoft Store, just search and install App-Installer.. Or get the APPX Package and install it manually –> I wouldn’t recommend because in this case you have to keep it updated manually.

Where are the Application sources? The Applications are managed within a Github Community Repository, where you can also take part and contribute: Github Repo

Through Winget installed applications aren’t different from applications you installed conventional like downloading the .EXE and running it. This means you can uninstall for example those applications through Control Panel (control.msc) or Settings but also through Winget.

To get all the commands and the flag (like a silent install switch 😉 –> -h) have a look to Microsoft documentation: MS Docs

Why do I need Winget? Simple, in my opinion there are two main reasons:
1. To install/remove Applications in bulk -> I will give an example bellow.
2. To update Applications in bulk -> In my experience not all Applications are running through but at percentage of round abound 85% does.
–> Pro-Tipp: Create a batch, put in into task-scheduler for automation purpose.

Install application in bulk

How to install several Applications in bulk: 1. You can use this Website (very nice Design, props to the Creators!) to pick Applications and generate a script (or a JSON) or you can pick a custom Pack.. damn that’s very hot:
https://winstall.app
2. You can export a list from Winget from a Windows client which already have all the necessary Applications and import it to the other clients:

Export cmd:

PowerShell
winget export -o c:\temp\myexport.txt # -o flag indicates the outfile location

The content of the file created:

post5_4.png

Import cmd:

PowerShell
winget import -i c:\temp\myexport.txt # -i stand for the filelocation 

–> Pro-Tipp: Put the file in a central Share, build a batch and refer to the share 😉

Batch

Just write a simple batch like this one to install multiple Applications:

Batchfile
@ECHO OFF

winget install --id=Mozilla.Firefox -e -h
winget install --id=Opera.Opera -e -h
winget install --id=Discord.Discord -e -h

exit

And this one for uninstall multiple Applications:

Batchfile
@ECHO OFF

winget remove --id=Mozilla.Firefox -e -h
winget remove --id=Opera.Opera -e -h
winget remove --id=Discord.Discord -e -h

exit

post5_5.png

That’s it, have fun playing around.

Cheers!