I've been using this approach since early Windows 10 days but it doesn't work for Windows 11. Any idea how to fix it? I don't remember where I got the scripts from and I'm not the author. extract-esd-to-folder.ps1 Code: $ESDFilePath="file.esd" $ImageExclusions=@( 'Windows Setup Media' 'Microsoft Windows PE (x64)' 'Microsoft Windows Setup (x64)' 'Microsoft Windows PE (x86)' 'Microsoft Windows Setup (x86)' ) $AllImages=Get-WindowsImage -ImagePath $ESDFilePath $SetupMediaImage=$AllImages.Where({$_.ImageName -eq "Windows Setup Media"}) $SetupImage=$AllImages.Where({$_.ImageName -eq "Microsoft Windows Setup (x64)"}) New-Item -Path ".\ISOFiles" -ItemType Directory Expand-WindowsImage -ImagePath $ESDFilePath -Index $SetupMediaImage.ImageIndex -ApplyPath ".\ISOFiles" Export-WindowsImage -SourceImagePath $ESDFilePath -SourceIndex $SetupImage.ImageIndex -CompressionType Maximum -DestinationImagePath ".\ISOFiles\Sources\boot.wim" -DestinationName $SetupImage.ImageName $AllImages.Where({$_.ImageName -notin $ImageExclusions}).foreach( { Export-WindowsImage -SourceImagePath $ESDFilePath -SourceIndex $_.ImageIndex -CompressionType Maximum -DestinationImagePath ".\ISOFiles\Sources\Install.wim" -DestinationName $_.ImageName } ) create-iso-from-folder.ps1 Code: $ISOMediaFolder = 'D:\ISOFiles' $ISOFile = 'D:\my.iso' $PathToOscdimg = 'D:\WindowsKits10ADK\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg' $BootData='2#p0,e,b"{0}"#pEF,e,b"{1}"' -f "$ISOMediaFolder\boot\etfsboot.com","$ISOMediaFolder\efi\Microsoft\boot\efisys_noprompt.bin" Start-Process -FilePath "$PathToOscdimg\oscdimg.exe" -ArgumentList @("-bootdata:$BootData",'-u2','-udfver102',"$ISOMediaFolder","$ISOFile") -PassThru -Wait -NoNewWindow Then burn the ISO with the latest Rufus. In multiple computers I get the same error:
I appreciate the link but I don't trust third party tools with no source or blobs (no offense intended! you're all great) that's why I searched for the script a few years ago. Just trying to check if someone knows the reason or had the same issue
FIXED The problem was that the image names changed. To see the new names you can use Code: Write-Output $AllImages exit e.g. Microsoft Windows Setup (x64) changed to Microsoft Windows Setup (amd64) The errors were being silenced for some reason.
Try whit this modify: extract-esd-to-folder.ps1 Spoiler Code: $ESDFilePath="file.esd" $ImageExclusions=@( 'Windows Setup Media' 'Microsoft Windows PE (amd64)' 'Microsoft Windows Setup (amd64)' 'Microsoft Windows PE (x86)' 'Microsoft Windows Setup (x86)' ) $AllImages=Get-WindowsImage -ImagePath $ESDFilePath $SetupMediaImage=$AllImages.Where({$_.ImageName -eq "Windows Setup Media"}) $SetupImage=$AllImages.Where({$_.ImageName -eq "Microsoft Windows Setup (amd64)"}) New-Item -Path ".\ISOFiles" -ItemType Directory Expand-WindowsImage -ImagePath $ESDFilePath -Index $SetupMediaImage.ImageIndex -ApplyPath ".\ISOFiles" Export-WindowsImage -SourceImagePath $ESDFilePath -SourceIndex $SetupImage.ImageIndex -CompressionType Maximum -DestinationImagePath ".\ISOFiles\Sources\boot.wim" -DestinationName $SetupImage.ImageName $AllImages.Where({$_.ImageName -notin $ImageExclusions}).foreach( { Export-WindowsImage -SourceImagePath $ESDFilePath -SourceIndex $_.ImageIndex -CompressionType Maximum -DestinationImagePath ".\ISOFiles\Sources\Install.wim" -DestinationName $_.ImageName } )