Remove Windows 10 Provisioned Apps with Intune

Since the days of Windows 8, IT Pros have had to find a way to remove the built-in or "provisioned apps" that ship with Windows. Doing a quick search on the web will provide plenty of ways on how to achieve this during OSD, or even through servicing your Windows image, but today I am going to walk you through removing the apps by deploying a script through Microsoft Intune.

NOTE - Although this post covers deploying a script through Intune, you can easily deploy it using other means like ConfigMgr, GPO, or a Scheduled Task. The trick is that the script needs to run as the user.

First things first, it helps to understand the differences between a "provisioned app" and your typical "appx package". Provisioned apps are cached and available for every new user during the user's profile creation. Once a user profile is created, the provisioned app then gets installed as a regular appx package. So using Remove-ProvisionedAppxPackage works great to remove that cache, but will have no effect on user profiles that were already created. To remove the appx packages from an already existing user, you need to run Remove-AppxPackage as the user since these packages are isolated for that particular user.

Now get the script from here. It's a very simple script - but there is nothing complex going on here - we are just going to remove the appx packages. Now before we do anything, make sure you edit the script and either remove or comment out the packages that you want to keep.

Now once the script has been edited with your preferences, log into the Azure Portal.

From the search box at the top, search for "Intune" and select Intune from the selection.

azportal_intune_search

Once your in the Intune management blade, navigate to Device configuration > PowerShell scripts

intune_posh_menu

From the PowerShell scripts management blade, click +Add. In the Add PowerShell script blade, name your script, add a description, and click Configure.

From the Script Settings blade, select YES for Run this script using the logged on credentials, click OK, and finally Create.

intune_posh_settings

Now you should be redirected to the script management blade (if not, just go back to PowerShell scripts and click your script that was just created). Once in there, select Assignments. From here, select the groups you want to deploy the script to based on your requirements and your finished.

intune_posh_assignment

This script works great with Windows 10 AutoPilot!

About Frank Trout

I am an IT Consultant with ~20 years of experience working with Microsoft technologies. I am also a blogger, a Microsoft MVP, and an all-around geek at heart.