Table of Contents

Information

Requirements

Get Indexes

dism.exe /Get-WimInfo /wimFile:"%UserProfile%\Downloads\W10\sources\install.wim"

Extract Index

dism.exe /Export-Image /SourceImageFile:"%UserProfile%\Downloads\W10\sources\install.wim" /SourceIndex:"10" /DestinationImageFile:"%UserProfile%\Downloads\install.wim"

Verify Index

dism.exe /Get-WimInfo /wimFile:"%UserProfile%\Downloads\install.wim"

Create Directories

mkdir "%UserProfile%\Downloads\mounted-wim" "%UserProfile%\Downloads\update-packages" "%UserProfile%\Downloads\temp-export"

Mount WIM

dism.exe /Mount-WIM /wimFile:"%UserProfile%\Downloads\install.wim" /index:"1" /MountDir:"%UserProfile%\Downloads\mounted-wim"

Add Updates to WIM

dism.exe /image:"%UserProfile%\Downloads\mounted-wim" /Add-Package /PackagePath:"%UserProfile%\Downloads\update-packages"

Cleanup WIM

dism.exe /image:"%UserProfile%\Downloads\mounted-wim" /Cleanup-Image /StartComponentCleanup /ResetBase

Check Updates in WIM

dism.exe /Get-Packages /image:"%UserProfile%\Downloads\mounted-wim"

Commit Changes to WIM

dism.exe /Unmount-wim /mountdir:"%UserProfile%\Downloads\mounted-wim" /commit

Compress WIM

dism.exe /Export-Image /SourceImageFile:"%UserProfile%\Downloads\install.wim" /SourceIndex:"1" /DestinationImageFile:"%UserProfile%\Downloads\temp-export\install.wim" /Compress:"maximum"