Windows powers simple daily tasks as well as complex environments, but its true flexibility lies in its customizable features. Optional features like Windows Subsystem for Linux or Remote Server Administration Tools (RSAT) are modular components. You can choose which one to install, allowing you to tailor your OS to your specific needs.
In Windows 10, modifying install media to preconfigure these features unlocks efficiency, security, and consistency. Pre-installing critical tools like Hyper-V or stripping unused components can reduce deployment time, shrink attack surfaces, and ensure compliance with IT policies.
In this guide, you’ll learn how to add or remove Optional Features directly from installation media, a skill that transforms the Windows experience for enterprises, developers, and even gamers.
Step-by-step guide to managing Windows Install Media features
Here’s a quick prerequisites checklist to get started:
- Windows 10 ISO or installation files, so you can access the install.wim file, the core image containing the OS (see What Is ISO Compliance? Overview & Importance)
- Administrator privileges, so you can make system-level changes with elevated access to modify protected files
- DISM tool (built-in), a command-line utility to directly edit Windows images
- Windows ADK, is downloaded for advanced tasks like creating or modifying WIM files from scratch
- 10GB to 15GB free disk space to serve as breathing room for mounting and editing large OS images
Follow these steps to add or remove Optional Features directly from the install.wim file:
- Extract the Windows ISO.
- Extract the contents of the Windows ISO file to a folder using tools like 7-Zip. In this example, we’ll use ‘D:\ISO_Files’ as the destination folder.
NOTE: If your installation media contains an install.esd file instead of install.wim, you’ll need to convert it to a WIM file before proceeding.
- Identify the image index.
-
- Search for PowerShell in Start, then right-click the resulting app and select Run as administrator.
- Run this command to identify the image index:
Get-WindowsImage -ImagePath "D:\ISO_Files\Sources\install.wim" | Format-Table ImageIndex, ImageName
NOTE: Keep in mind the index number for your target edition (like Index 1 = Windows 10 Pro).
- Mount the image.
-
- Create a Mount Directory: e.g., C:\Mount.
- Mount the Image using PowerShell:
Mount-WindowsImage -ImagePath "D:\ISO_Files\Sources\install.wim" -Index
1
-Path "C:\Mount"
NOTE: Replace 1 with your target index. This loads the OS image into your folder for editing.
⚠️: DISM error 0xc1510111 may occur when your drive is read-only or NTFS permissions block write access, even with admin rights or UAC elevation. See troubleshooting to fix this issue.
- Add or remove features.
-
- To add a feature:
Get-WindowsOptionalFeature -Path "C:\Mount" | Where-Object {$_.State -eq "Disabled"} | Out-GridView -PassThru | Enable-WindowsOptionalFeature -Path "C:\Mount"
This command opens a window where you can select disabled features to enable.
-
- To remove a feature:
Get-WindowsOptionalFeature -Path "C:\Mount" | Where-Object {$_.State -eq "Enabled"} | Out-GridView -PassThru | Disable-WindowsOptionalFeature -Path "C:\Mount"
This command opens a window where you can select the enabled features to disable.
- Save the changes and unmount.
-
- Once done, commit your changes to the install.wim file:
Dismount-WindowsImage -Path "C:\Mount" -Save
- Create a bootable ISO.
-
- Build a bootable ISO from your modified files to finalize your custom Windows install media:
- Open your preferred ISO creation tool (e.g., OSCDIMG, Rufus, ImgBurn).
- Set the source folder (usually D:\ISO_Files) to your edited installation directory.
- Click Build to handle boot sectors automatically.
- Build a bootable ISO from your modified files to finalize your custom Windows install media:
Advanced tips for modifying Windows Install Media
Now that you’ve learned the basics of adding and removing the optional features in Windows Install Media, here are pro strategies for greater optimization:
Batch-enable features in a single command
You can save more time by enabling multiple Optional Features at once. Append additional /FeatureName: arguments to a single DISM command:
dism /Image:"C:\Mount" /Enable-Feature /FeatureName:NetFx3 /FeatureName:TelnetClient /All /Source:"E:\sources\sxs"
This command adds both the .NET Framework 3.5 and Telnet Client in one go. You can learn more about the DISM Command in How to Use the DISM Command for Windows Image Deployment and Servicing.
Permanently remove feature binaries
Disabling a feature hides it, but the file remains. To completely delete them (freeing up space and reducing vulnerabilities), add /Remove:
dism /Image:"C:\Mount" /Disable-Feature /FeatureName:WindowsMediaPlayer /Remove
Use this command for features you’ll never need, like legacy media players.
Convert ESD to WIM format
If your ISO uses the compressed install.esd file instead of install.wim, convert it with this command:
dism /Export-Image /SourceImageFile:"install.esd" /SourceIndex:1 /DestinationImageFile:"install.wim" /Compress:Max
ESD files are common in official Windows 10 ISOs, but DISM can’t modify them directly. (For details, read How to Convert an ESD File to WIM Using DISM in Windows 10.)
Modify boot.wim for setup customization
If you need to tweak the Windows Setup environment (e.g., adding WinPE tools), apply the same steps to boot.wim:
dism /Mount-Wim /WimFile:"E:\sources\boot.wim" /Index:1 /MountDir:"C:\BootMount"
Edit features and commit your changes, and your custom setup environment will reflect them during OS installation.
Frequently Asked Questions (FAQ)
Can I add features that aren’t in the original install media?
Yes, but you will need the feature’s source files. For instance, when you enable .NET Framework 3.5, it requires pointing DISM to the sources\sxs folder in your ISO or a Feature on Demand (FoD) ISO. Some newer features may also need a Windows Update connection during installation.
Does removing features actually save disk space?
Absolutely. Using /Disable-Feature /Remove deletes the feature’s files from the install.wim, shrinking your image size. Just make sure the feature isn’t critical for your environment.
Will this work for Windows 11?
The process is similar, but feature names and availability may differ. Always run the commands in Step 4 to verify compatibility. These commands open a window where you can select features to enable or disable.
Can I automate this for large-scale deployments?
Yes. Tools like Microsoft Deployment Toolkit (MDT) or System Center Configuration Manager (SCCM) let you script commands. For DIY workflows, integrate PowerShell with DISM to batch-modify install.wim files across multiple images.
Troubleshooting common Windows Install Media issues
Issue: “Feature not found” error
IF DISM claims a feature doesn’t exist, double-check two things:
- Source Path: Ensure the /Source flag points you to the correct sources\sxs folder in your ISO or extracted files.
- FeatureName: Verify the exact name using dism /Image:”C:\Mount” /Get-Features.
Issue: “DISM error 0xc1510111”
This error may occur when your drive is read-only or NTFS permissions block write access, even with admin rights or UAC elevation. To fix it:
- Right-click the drive, then select Properties.
- Go to Security > Advanced, then grant Full Control.
NOTE: For more details, see How to Change Permissions in Windows 10: Files, Folders, and More.
If this error persists, it’s most likely that the ISO is a read-only drive and its permissions cannot be adjusted. To resolve this:
- Create a new folder on a writable NTFS drive (e.g., C:\ISOFiles).
- Copy all contents of the mounted ISO to that folder.
- Once copied, go to C:\ISOFiles\sources\install.wim.
- Right-click the folder, then select Properties, and uncheck Read-only if checked.
Another option is to recreate the ISO. You can use one of the following:
- Use the Oscdimg tool (from Windows ADK).
- OR, use third-party tools like PowerISO, UltraISO, or Rufus to make a bootable USB
Now, you can safely mount the WIM file from the new location.
Issue: “Mount Directory not found/in use”
This message usually means DISM can’t access your mount folder. Fix it by:
- Creating the folder manually (e.g., C:\Mount).
- OR, avoid mounting images to restricted folders.
Issue: “Access denied” errors
DISM requires elevated privileges to modify system files. Simply:
- Right-click Command Prompt > Run as Administrator.
- Avoid mounting images to restricted folders (e.g., Program Files).
Issue: DISM “Cannot commit changes”
If DISM refuses to save edits:
- Close all open files in the mount directory.
- Unmount any stale images first with dism /Cleanup-Wim.
Customize Install Media on Windows 10 like a pro
Windows install media isn’t just a one-size-fits-all solution. It’s a canvas for IT teams and power users to craft efficient, secure, and purpose-built systems.
By adding critical tools like Hyper-V or stripping unnecessary bloat, you ensure deployments align with organizational needs. Tools like DISM put you in control, but always validate changes in a virtual machine first to avoid surprises.
Prioritize license compliance for proprietary features, automate workflows for scale, and remember: a lean, preconfigured image saves hours of post-install tweaking. With these strategies, you’re not just installing Windows; you’re engineering it to work smarter.