Up 5 Down 0

Create Windows 11 unattended ISO

PowerShell:

# Create directory structure
md C:\Unattended
md C:\Unattended\Drivers
md C:\Unattended\Install
md C:\Unattended\Boot
md C:\Unattended\WindowsISO

Download Windows 11 ISO

# Extract ISO to C:\Unattended\WindowsISO\
Start-Process -FilePath "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -y -oC:\Unattended\WindowsISO $env:userprofile\Downloads\Win11_25H2_Dutch_x64.iso"

Extracted (storage) drivers to C:\Unattended\Drivers\
Copy DefAppAssoc.xml to C:\Unattended\
Copy autounattend.xml to C:\Unattended\WindowsISO\

[showhide type="Index" more_text="Click to show how to get correct Index values" less_text="Get correct Index values:"]

Get-WindowsImage -ImagePath C:\Unattended\WindowsISO\sources\boot.wim

ImageIndex: 2 ImageName: Microsoft Windows Setup (x64)
Get-WindowsImage -ImagePath C:\Unattended\WindowsISO\sources\install.wim

ImageIndex: 5 ImageName: Windows 11 Pro

Use those Index values in the following command:
[/showhide]

# Mount Windows image files
Mount-WindowsImage -Path C:\Unattended\Boot\ -ImagePath C:\Unattended\WindowsISO\sources\boot.wim -Index 2
Mount-WindowsImage -Path C:\Unattended\Install\ -ImagePath C:\Unattended\WindowsISO\sources\install.wim -Index 5

# Add drivers
Add-WindowsDriver -Path C:\Unattended\Boot\ -Driver C:\Unattended\Drivers -Recurse
Add-WindowsDriver -Path C:\Unattended\Install\ -Driver C:\Unattended\Drivers -Recurse

# Set Default App Associations
Dism.exe /Image:C:\Unattended\Install\ /Import-DefaultAppAssociations:C:\Unattended\DefAppAssoc.xml

# Unmount Windows image files
Dismount-WindowsImage -Path C:\Unattended\Boot\ -Save
Dismount-WindowsImage -Path C:\Unattended\Install\ -Save

Create USB from ISO using Rufus or generate UEFI ISO for Ventoy.

C:\WINDOWS\system32\cmd.exe /k "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\DandISetEnv.bat"

oscdimg -m -o -u2 -udfver102 -bootdata:2#p0,e,bC:\Unattended\WindowsISO\boot\etfsboot.com#pEF,e,bC:\Unattended\WindowsISO\efi\microsoft\boot\efisys_noprompt.bin C:\Unattended\WindowsISO C:\Unattended\Windows.iso