A little more than a year ago, with very little fanfare, Microsoft sneaked a very cool, very powerful little utility into Windows. It’s called the Windows Package Manager or winget for short. winget is Microsoft’s answer to apt or yum (or other) application package managers on Linux orHomeBrewon the Mac.winget lets you easily install, update, and remove Windows applications from a DOS command line. Not only is this a great way to install apps on Windows, it allows easy scripting so that you can easily spin up a new machine with your favorite apps.

winget was introduced with Windows 1709 (The 2020 Fall Creators Update). If you’ve been updating your PC regularly winget is probably on your PC. Open a command line and type winget to see if it’s installed. If it is, you’ll see a screen like Figure 1 below:

Figure 1. winget is installed

If you get an error, first use winver from a command line to make sure you have version 1709 or higher as shown in Figure 2 below:

Figure 2. Using WinVer to see what version of Windows you have installed

If you don’t have winget installed but do have Windows version 1709 or later, use these directions to install it or install it manually from this site.

Using winget

Typing winget without command line arguments shows winget's available commands:

To get a sense of the software that winget provides, use the search command without any arguments:

You can also use the winget.run site to search for winget packages.

In mid-November, 2021, more than 2900 software packages are available through winget. Many are free, or at least "freemium" packages, but some need to be licensed, so after installing you may need to acquire a license. winget's philosophy is that you generally know what you’re looking for. Therefore, if you are unfamiliar with a package you see listed, it’s prudent to research with Google before installing it. That said, if you’re using it to set up a PC with your favorite utilities, you probably already know what you want.

Let’s assume you want to install the Firefox Developer Edition browser. First, search for Firefox with this command:

winget responds with the packages that reference ‘firefox’

Figure 3. Using winget’s search command

We want to install the product in the red box, so type

on the command line and press enter. In less than a minute, Firefox Developer Edition is installed for you.

If, like me, you use MS Edge exclusively as downloader for Firefox Developer Edition or Chrome, rejoice that with winget you don’t need MS Edge for anything!

Some products have multiple source entries in the winget product repository. Let’s say you want to download 7-Zip, the popular zip utility. When you search for 7-Zip, winget displays:

Figure 4. winget showing multiple app sources This means there is more than one source in the winget repository that provides the download you requested. I didn’t like the sound of “Unofficial” so I downloaded 7-Zip from the winget source by using the -s flag:

Scriptable installs

With virtual machines so easily available now it’s not uncommon for me to need to spin three or four VMs per month. I have a text file named winget-install.txt with the following contents: winget's Import command installs all of those applications with a single command: In just a few minutes, most of the applications needed are ready to go. ASNA products (and a few others) need to be installed manually but winget provides a huge head start for setting up a developer’s PC. For quickly spinning up a new developer PC, winget is highly recommended. Read more about it here and/or watch this YouTube video.