A PowerShell script to automate the debloating process for Windows ISO images. It removes specified packages, features, and performs various system tweaks to create a streamlined Windows installation.
- Windows OS
- PowerShell
- Administrator privileges
This script has been tested with:
- Windows 10 version 22H2 (Build 19045.3757)
- Windows 11 version 23H2 (Build 22631.4037)
Should work with any other versions too
- Launch PowerShell as ADMINISTRATOR and execute the following commands
Set-ExecutionPolicy Unrestricted -Force
iwr -useb https://itsnileshhere.github.io/Windows-Iso-Debloater/download.ps1 | iex
Alternatively, you can manually download the script from here and execute it using PowerShell with ADMINISTRATOR privileges.
- Select Windows ISO from the dialogue. Follow the instructions.
- The ISO will be generated in the same directory where the script is located.
- To whitelist a package, simply comment out its name in the script.
Package removal can be customized by modifying the following sections of the script:
- Packages to remove
- Features to remove
- Registry tweaks
The script downloads "oscdimg.exe", used to generate the ISO, from Microsoft's website. If you have any doubts, you can download it using the following steps:
- Download the "Windows ADK" Package from Microsoft.
- Run the setup. During installation, only check the "Deployment Tools" option and continue the installation.
- After installing, navigate to "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg". The "oscdimg.exe" file will be located there.
- Copy the file and paste it alongside the script."
Note: This script modifies the Windows ISO. Use it at your own risk, and ensure you have a backup before running.