At Microsoft Build 2021, Microsoft released the version 1.0 of Winget. This tool is a part of the new Windows Package Manager for Windows 10 and Windows 11.
You can use Winget from the command-line to discover new apps, install, update and remove them.
If you are running Windows 11 or Windows 10 version 1809 or later, you don't need to install anything. It's shipped with the operative system as update and it's a part of Windows 11 default installation.
In the other cases, you can download it directly from this link: ms-appinstaller:?source=https://aka.ms/getwinget
To search for applications you can open your favorite terminal application (I use Windows Terminal and I love it) and type the command below:
winget search spotify
In this case, obiously, winget are searching for spotify.
With the command below you can install an application
winget install vscode
you can also you the silent mode with the following command
winget install vscode -silent (or -h)
You don't see an external UI for the installation, but a progress bar appears directly in the console.
This is useful for automated installations of your machine (after a reset, for example).
(I will talk about automation in a paragraph below)
It's very easy, you can have a list of all installed application on your machine:
There is a column that specifies if the installation comes from winget or a "normal" installation.
Another column at the end of the table, indicates if the application has updates
Keep the applications up-to-date is important for having the latest features released from the developers but it's more important for the security of your machine.
if you want to update all the application directly you can use the following command:
winget upgrade —all
You can also update a single application
winget upgrade —id vs-code
This is my favorite features of winget. You can export all the installed application of an existing machine to another machine.
This is very useful if you want to have a kind of backup of your applications list and restore that backup in the another machine.
winget export -o .\my-applications.json
You can set the path of the json file in a OneDrive directly, for instance. In this case you can access the latest version of the export everytime from another machine.
If you want to import the same list in an other machine:
winget import -i .\my-applications.json
In the past, as you know, I really loved Cholately or Boxstarter, but since a few months I am using only winget to have the same goals.