Skip to main content
Windows 10

How to Remove Built-in Apps, Features & Editions from a Windows 10 Install Image (WIM file)

By April 5, 2021August 18th, 2021No Comments

In this post we’ll show you how to remove Microsoft Store provisioned apps, features (capabilities), and unused Windows editions from a Windows 10 installation image (install.wim file). Let’s do it manually using DISM or PowerShell (but all actions can be automated using some scripts). Finally, we’ll get a clean Windows 10 install image without any programs or components we don’t need. This image will contain only core Microsoft Store apps and features.

This post explains how to clean and optimize the Windows 10 install image to deploy it on corporate computers in case of clean install or build upgrade. After upgrading the build on users’ computers using SCCM (from Windows 10 1803 to Windows 10 1909) via setup.exe /auto upgrade, we found that some built-in UWP (Microsoft Store) apps uninstalled earlier appeared on these computers again.

Windows 10 Build 1909 was used as an example in this post, but the guide also works with other Windows 10 builds.

When you install Windows 10 on a computer, the Windows image \sources\install.wim (or install.esd) is actually deployed. If your Windows 10 install image is stored as an ISO file, mount it to a virtual CD drive and copy the E:\sources\install.wim (or install.esd) file to your local disk. You can also copy the entire directory, but we need only the .wim file.

The DISM command is used to modify a .WIM file. If you are using an older Windows image that you are making an image for, make sure that you are using the latest DISM version. To work with Windows 10 install.wim files in other OS versions, you need to install the Windows ADK (Windows Assessment and Deployment Kit). You can download the ADK here: Scroll down the page and click “Download the Windows ADK for Windows 10”. Currently, the latest version is ADK for Windows 10, version 2004. You should only install the Deployment Tools instead of the whole ADK toolkit.

windows 10 install deployment tools from adk

It is recommended to use the full path to DISM.exe when running image modification commands (for example, ‘C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\dism.exe’). Earlier DISM versions may not work with newer versions of .wim files.

How to Remove Additional OS Editions from a Windows 10 Install.WIM File?

By default, the Windows 10 installation image generated by the Windows 10 Media Creation Tool contains all available Windows editions. If you are using only one Windows 10 edition (Professional or Enterprise, as a rule), you can remove all additional Windows editions from your install image. Removing unnecessary editions of Windows from install.wim doesn’t reduce the size of the .WIM file much. Only XML files and some metadata are removed.

Get the list of available Windows 10 editions in the install.wim file:

Dism /Get-WimInfo /WimFile:"e:\sources\install.esd"

Dism /Get-WimInfo - windows editions in install.wim

In our example, there are 9 editions in the image: Windows 10 Home, Windows 10 Home Single Language, Windows 10 Education, Windows 10 Enterprise, Windows 10 Pro, etc., with indices from 1 to 9.

You can export an installation image of a specific Windows 10 edition from an ESD file to a WIM image using the following command:

Dism /export-image /SourceImageFile:c:\sources\install.esd /SourceIndex:6 /DestinationImageFile:c:\iso\install.wim /Compress:max /CheckIntegrity

dism export-image specific win 10 edition

This command will create a new install.wim file containing one edition only — Windows 10 Pro. Its index in the image will change to 1.

Let’s get a detailed information about the remaining image left in the WIM file:

dism /get-wiminfo /wimfile:c:\iso\install.wim /index:1

Index : 4
Name : Windows 10 Pro
Description : Windows 10 Pro
Size : 14,754,777,474 bytes
WIM Bootable : No
Architecture : x64
Hal : <undefined>
Version : 10.0.18363
ServicePack Build : 418
ServicePack Level : 0
Edition : Professional
Installation : Client
ProductType : WinNT
ProductSuite : Terminal Server
System Root : WINDOWS
Directories : 22541
Files : 96467
Created : 10/7/2019 - 4:05:55 AM
Modified : 11/15/2019 - 8:46:50 AM
Languages :
en-US (Default)

If you want to keep multiple Windows editions in install.wim, you can remove the editions you do not need using the /delete-image parameter of the DISM tool.

For example, you want to remove the Home and Home Single Language editions with the indices 1 and 3:

Dism /Delete-Image /ImageFile:c:\sources\install.wim /Index:1 /CheckIntegrity
Dism /Delete-Image /ImageFile:c:\sources\install.wim /Index:3 /CheckIntegrity

The /CheckIntegrity parameter allows to undo the operations of your WIM file modification if DISM detects any structural damage in the image.

Or you can delete the editions by their names:

Dism /Delete-Image /ImageFile:c:\sources\install.wim /Name:"Windows 10 Education" /CheckIntegrity

Also, you can remove the editions you don’t need from your Windows 10 install image using PowerShell:

Remove-WindowsImage -ImagePath "c:\sources\install.wim" -Index 2 –CheckIntegrity

Removing Built-in UWP Apps from Windows 10 Install Image

You can remove all provisioned UWP (Microsoft Store) apps from your Windows 10 installation image. It is useful to install the Windows faster and save space on your disk. You will also get rid of unwanted widgets, and it will be easier for your users to get insight on the operating system.

We will show you how to remove built-in UWP apps from install.wim using DISM or PowerShell.

Create a folder on your drive: C:\mount. Mount the Windows installation image (WIM) to this folder:

dism.exe /mount-wim /wimfile:c:\iso\install.wim /mountdir:c:\mount /index:1

Note that I used /index:1, since I had removed Windows editions I didn’t need from the image as described above. You can specify the index of the image you need.

dism moun-wim install.wim

After you have mounted your WIM file, you can display the list of provisioned Microsoft Store app packages. I have used a more convenient text file format to view the command output:

Dism.exe /image:c:\mount /Get-ProvisionedAppxPackages > c:\ps\apps.txt

The information about each app will look like this:

DisplayName : Microsoft.BingWeather
Version : 4.25.20211.0
Architecture : neutral
ResourceId : ~
PackageName : Microsoft.BingWeather_4.25.20211.0_neutral_~_8wekyb3d8bbwe
dism get Get-ProvisionedAppxPackages from install.wim file

Now it’s time for the most interesting part, we will remove all apps we don’t need. Unfortunately, apps like Edge, Cortana, Contact Support and some others cannot be removed (but you can disable them using GPO). I also recommend to leave the calculator (Microsoft.WindowsCalculator), photo viewer (Microsoft.Windows.Photos), Microsoft.VP9VideoExtensions, since new builds of Windows 10 don’t have classic (desktop) versions of these apps. Also, don’t remove the Microsoft.WindowsStore, because it is hard to restore it if you need it one day.

You can remove apps one-by-one or all at once. To remove a modern app from the mounted image, specify its name (PackageName). Let’s remove the BingWeather app:

dism.exe /image:c:\mount /Remove-ProvisionedAppxPackage /PackageName:Microsoft.BingWeather_4.25.20211.0_neutral_~_8wekyb3d8bbwe

dism Remove-ProvisionedAppxPackage

In the same way, remove all built-in apps you do not need.

When you are done, unmount the image and save the changes (see below for how to do it).

Also, you can remove preinstalled apps from the Windows 10 installation image using a ready-made PowerShell script from the TechNet Gallery :

An advantage of this method is that you don’t need to mount the wim file manually. All you have to do is to specify a path to the .wim file and run the PowerShell script. However, if something goes wrong, it will be harder to find an error no matter whether it is related to DISM or the script itself.

Open PowerShell as an administrator and run the following command:

.\removeapps.ps1 -pathtowim c:\Windows10\sources\install.wim -selectapps $true

powershell dcript Removing-Built-in-apps from windows 10 install image

You will see each app in a separate line and you can select whether to remove (Y) or leave (N) it.

After you select an action for all of the apps, the script will remove those you don’t need. Unlike DISM, you don’t need to save changes to the .wim file — they will be saved by the script.

If you want to remove all apps, remove the parameter selectapps $true in the end of the command. This will remove all applications that can be removed.

When working with PowerShell, you might get an error because the current execution policy settings don’t allow PowerShell scripts to run. powershell execution policy

To fix it, run this PowerShell command and change the Execution policy settings:

Set-ExecutionPolicy -ExecutionPolicy Unrestricted

This will allow PS1 scripts to run on.

Disable or Remove Capabilities & Features from a Windows 10 Install Image

You can use DISM to remove (or install) certain features from your Windows 10 installation image.

Get the list of preinstalled components in the mounted Windows 10 installation image using DISM:

Dism.exe /image:c:\mount /Get-Capabilities

Dism.exe /Get-Capabilities

A component may be installed or disabled (Not Present).

You can also display a list of all Windows components in the image using PowerShell (in this example, we will display only the installed Windows components):

Get-WindowsCapability -Path c:\mount|?{$_.State -eq "Installed"}

Windows 10 1909 has the following components preinstalled:


You can remove an installed component by its name. Let’s remove a face recognition component Hello.Face:

Dism.exe /image:c:\mount/Remove-Capability /CapabilityName:Hello.Face.18330~~~~

Also, you can enable some of capabilities in the image. For example, to install all RSAT administrative tools:

Get-WindowsCapability -Path c:\mount |? {$_.Name -like "*RSAT*" -and $_.State -eq "NotPresent"} | Add-WindowsCapability -Path c:\mount

In the same way, you can enable/disable other components. For example, let’s enable .NET 3.5 and disable SMB1:

dism.exe /image:C:\mount /enable-feature /featurename:netfx3 /all /source:E:\sources\sxs
dism.exe /image:C:\mount /disable-feature /featurename:smb1protocol

dism.exe /enable-feature /disable-feature in install.wim file

In the same way, you can integrate drivers or latest security updates to your Windows 10 install image.

Optimizing the Windows 10 WIM Installation Image

After you have made changes to your Windows 10 install image, optimize and clean it using the /cleanup-image parameter.

Remove previous component versions using the /ResetBase option:

Dism /Image:C:\Mount /cleanup-image /StartComponentCleanup /ResetBase

Check the image for errors using Dism /ScanHealth.

DISM /Image:C:\Mount /Cleanup-Image /ScanHealth

It remains to unmount the image and save the changes to the WIM file:

dism.exe /unmount-wim /mountdir:c:\mount /commit

If you have changed your mind, use the /discard parameter instead of /commit to discard changes.

To save space, you can additionally compress install.wim to install.esd using the command:

Dism /Export-Image /SourceImageFile:c:\iso\install.wim /SourceIndex:1 /DestinationImageFile:c:\iso\install.esd /Compress:recovery

Then copy your install.wim (install.esd) to your Windows install media. You should only copy the .wim file and not update any other files.

To create an ISO image from you install files, you may use a free portable program Folder2ISO or other similar programs.

Leave a Reply