An easy-to-use and customizable PowerShell script designed to optimize and debloat Windows ISO by removing unnecessary apps & components. Helps to create lightweight, clean ISOs for streamlined installations. Ideal for improved system performance and full control over Windows installation customization.
- Performance Boost: Creates lightweight Windows installations
- Clean Start: Removes pre-installed bloatware before installation
- Customizable: Provides full control over what gets removed from the ISO
- Privacy-Focused: Removes components that may collect telemetry data
- Smaller ISO Size: Reduces the overall size of installation media
The script has been thoroughly tested with:
- Windows 10: Version 22H2 (Build 19045.3757)
- Windows 11: Version 24H2 (Build 26100.1742)
Launch PowerShell as Administrator and execute:
irm "https://itsnileshhere.github.io/Windows-ISO-Debloater/download.ps1" | iex
Download the latest isoDebloater.ps1
from here
# SYNTAX
.\isoDebloaterScript.ps1 [OPTIONS]
# REQUIRED PARAMETERS FOR AUTOMATED MODE
-noPrompt # Run without prompts (requires -isoPath, -winEdition, -outputISO)
-isoPath "path\to\iso" # Path to Windows ISO file
-winEdition "Name" # Name of Windows image to process (e.g., "Windows 11 Pro")
-outputISO "Name" # Output ISO filename (without extension)
# CUSTOMIZATION PARAMETERS (All accept "yes" or "no") [Optional]
-AppxRemove "yes" # Remove Microsoft Store apps [Default: yes]
-CapabilitiesRemove "yes" # Remove optional Windows features [Default: yes]
-OnedriveRemove "yes" # Remove OneDrive completely [Default: yes]
-EDGERemove "yes" # Remove Microsoft Edge browser [Default: yes]
-TPMBypass "no" # Bypass TPM & hardware checks [Default: no]
-UserFoldersEnable "yes" # Enable user folders in Explorer [Default: yes]
-ESDConvert "no" # Compress ISO using ESD compression [Default: no]
-useOscdimg "yes" # Use oscdimg.exe for ISO creation [Default: yes]
# EXAMPLES
# Basic usage with interactive prompts:
.\isoDebloaterScript.ps1
# Fully automated with no prompts:
.\isoDebloaterScript.ps1 -noPrompt -isoPath "C:\path\to\windows.iso" -winEdition "Windows 11 Pro" -outputISO "Win11Debloat.iso"
# Customize specific options:
.\isoDebloaterScript.ps1 -isoPath "C:\path\to\windows.iso" -EDGERemove no -TPMBypass yes
# Create minimal Windows installation:
.\isoDebloaterScript.ps1 -AppxRemove yes -CapabilitiesRemove yes -OnedriveRemove yes -EDGERemove yes -ESDConvert yes
- After launching the script, a prompt will appear to select a Windows ISO file.
- The script will mount the ISO and analyze its contents.
- Options to customize which components to remove will be presented.
- The script will process the ISO according to the selections.
- A debloated ISO will be generated in the same directory as the script.
Components to be removed can be customized by editing the script:
- AppX Packages: Modify the
$appxPatternsToRemove
array to include/exclude Microsoft Store apps - Windows Capabilities: Edit the
$capabilitiesToRemove
array to manage optional Windows features - Windows Packages: Adjust the
$windowsPackagesToRemove
array to control core Windows components
The script includes numerous registry optimizations to:
- Improve system performance
- Enhance privacy settings
- Disable telemetry and data collection
- Remove unnecessary UI elements
The script utilizes oscdimg.exe
, a Microsoft tool for creating bootable ISO images. During execution, the script automatically downloads oscdimg.exe
directly from Microsoft's servers and uses it to generate the modified ISO.
For those who prefer to use their own copy of oscdimg.exe:
- Download the "Windows ADK" from Microsoft's official site
- During installation, select only the "Deployment Tools" component
- Navigate to:
C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg
- Check if
oscdimg.exe
is installed properly
The script supports two methods for creating the final ISO file:
By default, the script uses oscdimg.exe
, to create bootable ISO images
- Downloads automatically if not present
- Creates highly compatible ISO files
- Recommended for most users
To use this method (default):
.\isoDebloaterScript.ps1 -useOscdimg yes
An alternative ISO generation method using the IMAPI2FS interface
- Uses native Windows COM objects without external dependencies
- Creates bootable ISOs directly through Windows COM interfaces
- May work in environments where oscdimg has issues
To use this method:
.\isoDebloaterScript.ps1 -useOscdimg no
The script can remove various components based on preferences, including:
- Pre-installed Bloats: Candy Crush, Disney+, Spotify, TikTok, etc.
- Microsoft Apps: OneDrive, Skype, Teams, Office installers, Edge (optional)
- System Components: Windows Media Player, Windows Fax and Scan, etc.
- Features: Telemetry services, unnecessary language packs, etc.
If you find this project helpful, consider giving it a β on GitHub!
- tiny11builder for inspiration and approach
- Winaero for registry optimization techniques
- Microsoft for Windows ADK tools
This script modifies critical system files within the Windows ISO. While extensively tested, it's provided "as is" without warranties. The author is not liable for any damages that might occur from its use.
- Use at own risk
- Always back up important data before installing a modified Windows version
This project is licensed under the GPL-3.0 License.