Since the release of Windows 10, it has been common for organization to try and reduce the footprint of built-in apps (or default apps) in their reference images, or even during bare-metal deployment. Over the years, the community has provided several solutions on how to accomplish this including myself. During this time, I’ve attempted to keep my script updated after each new release of Windows 10. You’ll find the post about the method I’m using in the script and how to use it when creating a reference image here:
Going forward, instead of updating that blog post for each Windows 10 release, I’ve decided to create a new post instead with information on what has changed or been added in the script (if any).
I’ve made the script available on our GitHub repository along with all the other scripts that we’ve shared, and it’s available on the following URL:
Below is a list of changes and additions made to the latest version of the script:
- In the previous version of this script, the capability to remove Feature On Demand V2 packages could produce an error that many ran into when using the script. I also encountered issues after the initial release of the script and later found that the Get-WindowsCapability cmdlet in Windows 10 version 1709 and earlier, didn’t expose the same functionality as found with dism.exe. Now with Windows 10 version 1803, the Get-WindowsCapability cmdlet now has -LimitAccess switch that seems to workaround the issue that occurred. This switch simply just tells Windows to skip checking for capabilities from Windows Update and the cmdlet returns what’s installed on the system. So, in the latest version of this script, that switch has been added when the Get-WindowsCapability cmdlet is used. Logic to support older versions that Windows 10 version 1803 has also been added to this new version of the script
- Media.WindowsMediaPlayer has now been added to the white list for Feature On Demand V2 packages.
- Microsoft.MicrosoftOfficeHub, Microsoft.MicrosoftStickyNotes, and Microsoft.WindowsAlarms has now been added to the white list for appx packages.
- A few modifications has been made to the logging part of the script.
Using the script
Reference the previous instructions from the original post mentioned above. I highly encourage you to also implement the solution at the bottom from Johan’s blog about how to turn of the automatic app updates from the Windows Store.
Below is a few screenshot of how I’m using this script to remove the built-in apps along with Johan’s scripts:
Here’s one from when you enable the app updates from Windows Store at the end before creating the WIM file:
Before and after running the script
When using this script, either when creating a reference image or during bare metal deployment here the outcome of what the script in fact removes. Below is a screenshot from a Windows 10 version 1803 system before the script was executed:
And here’s the same system after the script was executed:
As for Feature On Demand V2 packages, the following remains on the same system as above after the script has executed successfully:
Chief Technical Architect and Enterprise Mobility MVP since 2016. Nickolaj has been in the IT industry for the past 10 years specializing in Enterprise Mobility and Security, Windows devices and deployments including automation. Awarded as PowerShell Hero in 2015 by the community for his script and tools contributions. Creator of ConfigMgr Prerequisites Tool, ConfigMgr OSD FrontEnd, ConfigMgr WebService to name a few. Frequent speaker at conferences and user groups.