Windows Server 2022

Install Winget in Windows Server 2022 – No applicable app licenses error

Fix for Install Winget in Windows Server 2022 - No applicable app licenses error. How to download and install winget with the license

Winget is a great new utility from Microsoft that brings us the native command-line software install/update functionality that we have been envious of every time we configure software on a Linux server. If you want to learn more about winget itself and the installation of winget in Windows 10, take a look at my post – Install Winget 1.0 Windows 10 and upgrade all software. In working with Windows Server 2022 a lot in the lab lately, installing software, etc, I wanted to see what the process looks like to install winget in Windows Server 2022. To my disappointment, it isn’t as easy as the process in Windows 10. Let’s take a look at how to install Winget in Windows Server 2022 – no applicable app licenses error to see the hurdles I ran into and how you can get winget installed in Windows Server 2022.

Winget not really for Windows Server yet

A harsh reality hit me when attempting to install winget in Windows Server 2022 that I had realized before attempting the install. Winget is not really for Windows Server, at least not yet. The reason for this is that Windows Server SKUs don’t ship with the Store client enabled. Take note of this comment from the Github page I will be highlighting a bit more below. This comes from @denelon who’s profile shows to work on Windows Package Manager:

Currently, the Windows server SKUs don’t ship with the Microsoft Store client enabled. This creates challenges for updating applications delivered by the Microsoft Store. As the Windows Package Manager ships as a part of the Desktop App Installer, and that is also not generally default on server SKUs, we don’t yet have a solid delivery mechanism nor an update mechanism in place today.

We have already started looking at the next evolution for theย Store For Business. The future integration with Intune is part of the story as we work towards support across our entire product portfolio.

So, the TLDR is:

  • No Windows store in Windows Server so winget doesn’t work

However, I wanted to see what happens when you try to install winget just using the normal means. The short story is you will receive an error. Let’s see how to fix it.

Install Winget in Windows Server 2022 – No applicable app licenses

First, we will take a look at the error message received when simply trying to install winget in Windows Server 2022 as you would in Windows 10. The overall process to work around the errors installing winget in Windows Server 2022 involves:

  1. Installing the VCLib package requirement
  2. Download the license file for Windows Package Manager
  3. Download Winget MSIXbundle file
  4. Install winget using the MSIXbundle package and license file

The error when installing winget

If you download the MSIXbundle file the same as in Windows 10, you will find that you can’t just double-click the file and have it install in Windows Server 2022 due to no store availability in Windows Server. However, we can use the Add-AppxPackage PowerShell cmdlet to install the MSIXbundle file.

What happens? If you try to directly install the MSIXbundle in Windows Server 2022, you will receive this error:

Installing the MSXI bundle for winget directly in Windows Server 2022
Installing the MSXI bundle for winget directly in Windows Server 2022

So we have a prerequisite package that needs to be installed. How do we get this?

1. Installing the VCLib package requirement

A blog post I hit when Googling around for installing winget in Windows Server 2022 is the following:

On this blog, there are two scripts, one for installing VCLib and the other for installing winget. I tried using both together and winget installs with the same license error we will see below. With the script for installing the VCLibs from this blog, I was able to get the prerequisite for this package installed successfully.

Installing the VCLib package using PowerShell
Installing the VCLib package using PowerShell

Can I just install winget now using the Add-AppPackage cmdlet? Yes, the install now works since we have installed the prerequisite VCLib package.

Winget now installs on Windows Server 2022
Winget now installs on Windows Server 2022

However, after installing winget without error, running the winget cmd results in an error:

Program 'winget.exe' failed to run: No applicable app licenses found
No applicable licenses found when running winget in Windows Server 2022
No applicable licenses found when running winget in Windows Server 2022

2. Download the license file for Windows Package Manager

So, what’s the deal, does winget require a license to run? Evidently so. Actually, not winget, but the Windows Package Manager. You can download the XML license file provided by Microsoft on the following Github link:

On the Github page, scroll all the way to the bottom under the Assets. You will see the License file listed with the source and installers.

Download the XML license file for Windows Package Manager
Download the XML license file for Windows Package Manager

3. Download Winget MSIXbundle file

So, what I did, was download the needed files into a folder:

License file VCLib powershell script and the winget MSIXbundle file for installing winget
License file VCLib powershell script and the winget MSIXbundle file for installing winget

4. Install winget using the MSIXbundle package and license file

After you have the needed files downloaded into a directory, you can run the following cmdlet with the license path parameter:

Add-AppxProvisionedPackage -Online -PackagePath .\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -LicensePath .\08d8788d59cf47ed9bf42c31e31f8efa_License1.xml -Verbose

Below, the command is basically the same, except we are pointing to the downloaded XML license file downloaded from the Github page. The install completes successfully.

Installing winget package in Windows Server 2022 with the license path parameter
Installing winget package in Windows Server 2022 with the license path parameter

After installing using the App

Winget running successfully in Windows Server 2022
Winget running successfully in Windows Server 2022

Wrapping Up

If you attempt to Install Winget in Windows Server 2022 – No applicable app licenses error will appear when running the application, even after installing the required VCLib requirement. However, by installing the freely available XML license file provided by Microsoft, you can install winget and it will work in Windows Server 2022. As discussed, this is due to the way the winget package currently relies on the Microsoft Store, which is not enabled in Windows Server SKUs.

After implementing the workaround shown, you will be able to fully enjoy using the winget package manager in Windows Server 2022 to install software packages as expected.

Subscribe to VirtualizationHowto via Email ๐Ÿ””

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com, and a 7-time VMware vExpert, with over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, He has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family. Also, he goes through the effort of testing and troubleshooting issues, so you don't have to.

Related Articles

7 Comments

  1. I wonder if that can be done without elevation. I get “Add-AppxProvisionedPackage: The requested operation requires elevation.” I suppose not, since apps installed through WinGet do so using behind the
    scenes elevation.

  2. Thank you for this. Using this I was able to get the license file installed and WinGet working on Windows 10 1809 LTSC.

    1. Paul,

      Sounds great! I definitely see a lot of benefits from using winget on the server side. It will be interesting to see how this develops from Microsoft’s perspective in patching and other workflows. Are you planning on using it to install third-party programs on the server side?

      Brandon

  3. I just by using choco install winget-cli was installed winget command line on win 2022 without any barriers.

    However there are warning messages mentined –
    “WARNING: This version of winget-cli is not officially supported on Windows Server operating systems.
    WARNING: It does not work on Windows Server 2019 and is not supported on Windows Server 2022”

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.