An Introduction To The Windows Package Manager

What’s up, everyone! 

In this post I’ll take a look at the Windows Package Manager. It’s an easy way to install, upgrade or delete an application for your Windows 10/11 endpoints. This means it will also work for Windows 365 Cloud PCs. Let’s find out how it works!

Requirements

There aren’t many requirements if you want to use WPM. You can use it on Windows 10 1709 (Build 16299) or later. It works on Windows 11 of course.

An Introduction To The Windows Package Manager

Let’s start with a post I wrote back in July on how to migrate to Windows 365. In one of the steps I talked about the importance of an application management strategy. Because if you’re managing endpoints, you’ll need to think about how to install, update and remove applications. This post is still very relevant today! 

I briefly mentioned the Windows Package Manager in this post. But what is it exactly? It’s a package manager solution that consists of a command line tool and a set of services for installing and maintaining applications on Windows 10 and Windows 11 endpoints. So you can install, update or remove an application. And as an independent software vendor (ISV), you can create and upload package manifests so your software can be considered for inclusion. And there’s more! Intune is already integrated with the new Microsoft Store which uses WPM so admins can easily deploy and maintain applications on Windows 10/11 endpoints.

The command line tool is called ‘winget’. You can use it to perform all the necessary tasks as an admin. I created a virtual machine for testing purposes. If you want to follow along, you might want to consider doing the same thing. You can also choose to test using Windows Sandbox. For more info on that, checkout this page.

How To Get 'winget'

Winget is already available on Windows 11 or newer Windows 10 builds. If you are using an older build of Windows 10, you might need to install the app named ‘App installer’ from the Microsoft Store on your system. 

Dutch version of the store app

How To Use The Winget Command

Using the ‘winget’ command is pretty intuitive! Just open your favorite console and run the command with the appropriate switch. 

Using the winget command is really intuitive. Just type ‘winget’, add the parameter and complete the command. You can enter ‘winget’ and get a complete list of the options. I’ve listed them below and included them with some screenshots and GIFs. Just click on a screenshot to zoom in.

Installs the given package:

Shows the information about a package:

Manage sources of packages:

Find and show basic info of packages:

Display installed packages. This also includes applications on the endpoint installed by using other means:

Shows and performs available upgrades:

Uninstalls the given package:

Helper to hash installer files:

Validates a manifest file:

Open settings or set administrator settings:

Make sure to checkout the Microsoft documentation for the settings command.

Shows the status of experimental features:

Exports a list of the installed packages.

Make sure to checkout the Microsoft documentation if you are going to use this command.

Installs all the packages in a file:

Demo: Search, Install and Remove Via Winget

Let’s see if we can play around with 7-Zip for this demo. We can find the application with the search command. All applications matching the criteria will pop up;

winget search 7-zip

We can narrow the search down by using parameters. Let’s say we just want to see the store apps:

winget search 7-Zip --source msstore

There’s also a way to view all available packages;

winget search -q `"`"

That’s already a very long list! 

Now that we’ve found the information for 7-Zip, let’s see if we can install the application using the install command. The easiest way would be to enter the install command followed by 7-Zip (Name). In this case we haven’t been clear because multiple packages are found. And winget will make sure to tell us just that:

Let’s try installing the application using the ID. 

winget install --id XPDNKVCX4QD2DC

So this UAC prompt makes sense. I’m demoing using a regular account since winget will not work for admin accounts. The installation will finish once you get past the UAC prompt:

Time to see if we can uninstall 7-Zip using the winget command line tool using the uninstall command. Just add the ID of the application and wait till the UAC prompt pops up again. 

I like how the tool will actually tell you which app it found.

winget uninstall XPDNKVCX4QD2DC

When you get past the UAC prompt, you’ll see that the app has been uninstalled:

That concludes the demo on using the winget tool manually. 

Demo: The New Microsoft Store Integration With Intune

Microsoft is retiring the Microsoft Store for Business early in 2023 and it will be replaced by a new Microsoft Store. It has already been integrated with Intune and we can already maintain applications on our Windows 10 or 11 endpoints using this new integration. Let’s take a look!

Login to Intune and go to Apps, By platform, Windows.

Click on the + Add button. There’s a new option in the menu called Microsoft Store app (new).

Next up is to find the application in the Microsoft Store. Click the Search the Microsoft Store app (new) link.

For this demo, I’ll see what happens if I search for Adobe:

The results show me which apps are found, who published them and the type of the application. I can see Store apps and Win32 apps (which can be either .MSI or .EXE). 

I’ll continue with Adobe Acrobat Reader DC. Once selected, you’ll see something like this:

A lot of values are already filled in automatically. Make sure to check the package identifier if you have any doubt that your chosen the correct version. You can match the package identifier against the Id from winget:

You can add a logo and add some more information if you want and finish up by assigning the app as a required app or an available app. In my case, I’ll just assign it to all my devices.

Take a second to admire your awesome work and save it if your happy with it. Now wait until the endpoints pickup the change. In the meantime I also added Microsoft Whiteboard from the new store. 

And a bit later I tested from a Cloud PC and as expected, both apps showed up!

Things To Keep In Mind

The new integration with Intune just made an admins life a lot easier and there’s already loads of applications available. But keep in mind this is a way to install, upgrade, remote (etc) an application. 

It will do just that, and not anything more. For instance;

  • If you installed the latest version from the new Microsoft Store, it does not mean that it’s the latest from the ISV. For instance, let’s say you install Notepad++ and run it. It will automatically check for an update online. And if there is one, the user will immediately see a question to update.
  • It will not disable any first run questions like, do you want Adobe Acrobat as your default PDF viewer?

Resources

Related Post

One thought on “An Introduction To The Windows Package Manager

Leave a Reply

Your email address will not be published. Required fields are marked *