Tuesday, 08 May 2018 19:52

Removing Windows 10 Apps / Capabilities Offline

Written by
Rate this item
(1 Vote)


In several of my previous articles, I've discussed how to remove built-in applications and capabilities during operating system deployment. Over the past few years, I delivered quite a few customer-focused Windows 10 workshops in which I placed emphasis on covering Windows as a Service in great depth. After all, one of my primary goals is to enable IT departments to keep pace with more frequent Windows updates and to allow them to continuously deliver new functionality to end-users. I realize that there are still some misconceptions out there as well as a need for more user guidance. In today's blog post I'd like to focus on removing built-in applications and capabilities straight from install.wim, and why you might want to do this in the first place.

Windows 10 "April 2018 Update", also known as version 1803, "Redstone 4", or RS4, is now available via Windows Update for Business, Windows Server Update Services (WSUS), the Volume Licensing Servicing Center (VLSC), and Visual Studio Subscriptions. Each Windows 10 release introduces new applications and Windows 10, version 1803, is no different. As faithful readers of my blog will know - yes, all three of them - starting with Windows 10 1703, applications removed during OS deployment will not come back after applying a feature update. However, new applications and/or capabilities will still be installed/activated as part of the feature update installation process. This is the default behavior and I do not expect it to change.

There are multiple ways of dealing with unwanted applications during the feature update scenario. You could remove applications after the fact, using a script based solution. I do not recommend this approach as you may encounter various timing issues with the installation of provisioned apps. Alternatively - assuming you are using volume licensing media - you could leverage Deployment Image Servicing and Management to remove packages from an offline Windows 10, version 1803 image. From a servicing perspective, this is the simplest approach for applying feature updates - mount the WIM file as a part of the Windows file system and make changes to the mounted Windows image in the WIM file - making it easier than ever to deploy new releases in a timely fashion.

The Tools You Need

Contrary to some rumors, you must install the latest version of the Windows Assessment and Deployment Kit (Windows ADK), which contains all of the tools that are required. Unfortunately, there has been some confusion around this in blogs and in the Windows technical community. This does not mean that using an older version of the Windows ADK will not work, but this scenario is not being supported by Microsoft and you may end up facing unexpected issues.

The Basic Approach

Here is a high-level overview of the app removal process:

  • Mount your Windows 10 image. To mount a volume licensing media WIM file, you must specify an image index. Starting with Windows 10, version 1709 single Windows image (WIM) file contains all the volume licensing images: Windows 10 Pro (volume licensing version), Windows 10 Enterprise, and Windows 10 Education.
    Note: use the optimize option to reduce initial mount time. Keep in mind that when using the optimize option, processes that are ordinarily performed during a WIM mount will instead be completed the first time that you access a directory.
    Important consideration: You should mount a WIM to an empty directory - just to eliminate confusion from any files you have stored there.
  • After you mount an image, you can enumerate provisioned Appx packages and then remove either all of them or a subset of the built-in applications and/or capabilities.
  • Finally, unmount and commit your changes. This makes your modifications a permanent part of the image. It's vital to understand that while you're making changes to the mounted WIM file, you are working with a cache of the WIM file, you are not changing the actual WIM file directly. There was a time where I would often forget to commit my changes (and thus losing them).

Making It Dynamic

It's worth emphasizing that with Microsoft introducing Windows as a Service your base image is constantly changing — the reality is that new features are now being built continuously, and feature updates that add new functionality are released two times per year. We as IT Pros have to become more agile as we have to adopt more frequent Windows releases. Thus, capturing and modifying the Windows image for feature updates needs to be as fast and easy as possible. The faster release cadences with regular feature updates mean that you need to streamline and automate your deployment processes in order to be more agile and keep pace - a PowerShell script is an obvious choice here to allow you to quickly modify the Windows 10 image in order to remove a constrained number of apps.

As per usual, I am not a fan of reinventing the wheel - there is literally no reason to waste time and develop a solution that might already be available on TechNet or an IT pro's blog. However, while a quick Google search yielded numerous results, none of the scripts did what I wanted them to do: mount a Windows 10 install.wim, remove a constrained set of provisioned apps and capabilities and commit the changes to the WIM file, so I quickly put together a script while heavily borrowing from the Michael Niehaus' excellent RemoveApps script. You can get the end result from my GitHub repository.

Before you run the script, you may need to adjust a few variables: $MountFolder, $MountPath, and $WimPath. By default, the script will remove all apps and capabilities, but I am providing sample RemoveApps.xml and RemoveCapabilities.xml files with a choice selection of in-box applications and capabilities. Note: If those files don't exist, the script will create these two files in the script folder, so you can run the script once (just make sure you either do not commit your changes or replace your install.wim after running the script). Then you can modify the files - the next time you run the script it will remove only the apps and capabilities you specified.

Moving forward, I am looking at options to optimize this process even further, for example by adding quality update offline servicing into the mix.

Read 17207 times Last modified on Wednesday, 09 May 2018 08:16

Recent Posts

  • Windows 10 21H2 Built-In Apps: What to Keep
    The development of the Windows 10, version 21H2 is finished and the update will soon be available for download from…
    Written on Wednesday, 20 October 2021 11:41
  • Group Policy Changes in Windows 10 21H2
    As Windows 10, version 21H2 update development winds down, Microsoft is now preparing for the final release of the Windows…
    Written on Wednesday, 20 October 2021 07:20
  • Group Policy Changes in Windows 10 20H1 Preview
    As Windows 10 Vibranium Update (20H1) development winds down, Microsoft is now beginning the phase of checking in the final…
    Written on Tuesday, 14 January 2020 04:51
  • An alternative ESU MAK Activation Solution
    This blog post was shared with me by a colleague of mine, Daniel Dorner, a Microsoft Premier Field Engineer. It’s…
    Written on Wednesday, 04 December 2019 21:04
  • The Case of Missing UE-V Templates
    My customers often deal with unexpected Windows behavior and this case is no different. This particular one is especially interesting…
    Written on Tuesday, 03 September 2019 12:20
  • The Case of Changing Default Printer
    While I sometimes long for the day when I no longer have to deal with unexpected Windows 10 behavior, there’s…
    Written on Wednesday, 14 August 2019 20:36