Downloading Microsoft Store apps using Windows Package Manager
By: Carlos Britos and Jason Sandys – Principal Product Managers | Microsoft Intune
Offline apps is the last remaining significant function of the Microsoft Store for Business on its path to full retirement. Offline apps allows customers to download packaged apps from the Microsoft Store for Business or Education for distribution through alternate mechanisms like a Windows Provisioning Package.
With the impending retirement of the Microsoft Store for Business and Education on August 15, 2024, this offline apps functionality will also retire but the ability to download and distribute packaged apps from the Microsoft Store to devices with restricted connectivity to the Microsoft Store remains. For this reason, starting with version 1.8, Windows Package Manager (WinGet) added the capability to download packages from the Microsoft Store. Unless explicitly disabled, all Windows devices will have automatically updated to this version already. To check the version running locally, you can run winget –v from a command prompt. For troubleshooting guidance, see Debugging and troubleshooting issues with the WinGet tool.
Keep in mind that just as with offline applications from the Microsoft Store for Business and Education, the download feature in WinGet is limited to packaged apps where the publisher has permitted offline licensing and distribution for organizations. This is controlled by the app publisher, not Microsoft. All unpackaged apps published to the Microsoft Store are available for download.
Also note, packaged apps include UWP apps packaged in the AppX format as well as apps packaged in the MSIX format. Unpackaged apps include all Win32 apps packaged in an alternate format such as MSI or EXE.
Downloading a Microsoft Store app using WinGet
Using the WinGet command line interface (CLI) to download an app from the Microsoft Store is straight-forward. The following example walks through the download of the Microsoft Remote Desktop app. This is an app published by Microsoft and allows offline downloads. For more information on any of the below steps or information related to the new download option, please refer to the WinGet download command documentation. Note that WinGet leverages Delivery Optimization to download apps from the Microsoft Store.
Locate the package you wish to download using the WinGet CLI. This step is optional
if you already know the exact package name or ID of the desired package in which case you can skip directly to step 2 below.
winget search “remote desktop” –source MSStore
Use the new download command line argument for the CLI along with the package ID previously returned. By default, files for the specified package are downloaded to the Downloads subfolder of the current user’s profile folder. To override this location, use the -d or –download-directory option on the WinGet command line.
winget download –id 9WZDNCRFJ3PS
Note: You can limit the scope of the downloaded package using additional filtering options on the WinGet command line, e.g., use -a or –architecture to only download content related to a specific OS architecture.
Review the initial information shown and accept the agreements linked by pressing Y and then Enter. If the current account is not currently logged into Microsoft Entra, you will be presented with a standard Entra ID authentication prompt and must successfully authenticate to proceed. Additionally, the account used requires one of the following roles:
Global Administrator
User Administrator
License Administrator
WinGet creates a new folder in the default or specified download folder named for the package ID you specified and proceeds to download the packages and its dependencies to this subfolder. Additionally, WinGet retrieves a license for the package as all packaged apps from the Microsoft Store require a license.
You can now use the downloaded package using your management tool of choice.
Installing a WinGet downloaded package in a Windows provisioning package
Using packages downloaded by WinGet within a Windows provisioning package allows you to install the downloaded apps while provisioning a Windows device for management by Microsoft Intune. To do this, follow these steps:
Download the Windows Configuration Designer (WCD) app from the Microsoft Store.
Launch WCD and choose the Provision desktop devices option on the Start page.
Provide a name and location for the project.
Provide information on the Set up device, Set up network, and Account Management pages as needed.
For the Add applications page, click Add an Application.
Provide the Application name, Installer path and License path for the application that you are adding.
Add all Required appx dependencies and click Add to finish. The following screenshot shows the completed Add applications page in WCD for Microsoft Remote Desktop including its x64 dependencies.
Complete the Add certificates page as needed and under the Finish step, select Create to complete the process.
Your provisioning package is now ready.
Installing a WinGet downloaded package using Intune
In general, we recommend using the built-in Intune functionality to distribute Microsoft Store apps to managed Windows devices. However, you can also use other device management tools to deploy packaged apps separately downloaded using WinGet download. Scenarios where you may consider this include the following:
Managed clients cannot access or are restricted from connecting to the Microsoft Store.
Strict app version control is required.
To use Intune for this, follow the steps at Add a Windows line-of-business app to Microsoft Intune. Note that managed Windows endpoints must be able to connect to the Microsoft license server to retrieve a license for any apps deployed this way as Intune has no built-in capability to do this. Additionally, Microsoft Store apps will automatically update from the Microsoft Store if devices have connectivity to the Microsoft Store and Automatic Store app updates is not disabled, regardless of the app deployment method.
By following these steps, you can effectively utilize WinGet and Intune to manage app deployments, ensuring all necessary licenses and dependencies are correctly handled. This approach facilitates a streamlined and controlled deployment process across managed Windows devices.
If you have any questions or feedback, leave a comment below or reach out to us on X @IntuneSuppTeam.
Microsoft Tech Community – Latest Blogs –Read More