Migrating to the new Windows Store experience

The Microsoft Store for Business will be discontinued mid 2023 and Intune recently introduced the new Windows Store experience backed by winget to distribute apps to your Intune managed endpoints.

To simplify the migration to the new Windows Store experience I created a PowerShell Script that migrates all currently assigned Windows Store for Business apps to the new Windows Store experience.

Kudos to Sander Rozemuller for providing detailed instructions about creating winget apps as PowerShell code samples.

Challenges

  • Not all apps in WSfB have valid privacy and information URLs, therefore I added a check whether the URL starts with http(s).
  • Some apps have characters present (äöüë….) that require UTF-8 encoding. So I explicitly set the HTTP content-type header to UTF8.

Script prerequisites

Install-Module Microsoft.Graph.Authentication, Microsoft.Graph.Devices.CorporateManagement -Scope CurrentUser

From a permissions perspective you need an Azure AD Application Administrator for the initial OAuth permission consent and for regular execution the Intune Administrator role.

The script

  • Fetch all assigned Windows Store for Business apps
  • Extract the app package identifier
  • Filter out existing winget apps (only apps not yet present will be imported as winget apps)
  • Search the Windows Store for package information
  • Fetch package information (description, publisher, image)
  • Creating the winget app

After running the script you will see the app type displayed as:
Microsoft Store app (new):

Migrated Windows Store for Business Apps

Now it’s time to assign the apps to a test group to verify the deployment and once you’re confident you can complete the migration by changing the assignments.

Should you decide during testing that you want to get rid off the newly imported apps and start over you can remove all winget apps with the following command:

Get-MgDeviceAppMgtMobileApp -Filter "isOf('microsoft.graph.winGetApp')" -All | ForEach-Object { Remove-MgDeviceAppMgtMobileApp -MobileAppId $_.Id }

Happy winget testing 🎁.

--

--

Interested in endpoint management, security, identity and automation. #Intune #AzureAD #Defender #PowerShell #Azure

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nicola

Interested in endpoint management, security, identity and automation. #Intune #AzureAD #Defender #PowerShell #Azure