Create directory structure:
md C:\Unattended md C:\Unattended\Drivers md C:\Unattended\Install md C:\Unattended\Boot md C:\Unattended\WindowsISO
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\Windows11_Client_x64_nl-nl_26300_9457.iso"
Extracted (storage) drivers to C:\Unattended\Drivers\
Copy DefAppAssoc.xml to C:\Unattended\
Copy autounattend.xml to C:\Unattended\WindowsISO\
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
Download and install Windows 11 ADK.
https://go.microsoft.com/fwlink/?linkid=2289980
During install, only select: Deployment Tools.
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