Use this when capturing, servicing and applying Windows images.
Windows Imaging
Windows imaging captures, modifies and applies Windows images with DISM: mount a WIM to add drivers and updates offline, capture a reference system, and deploy the image to many computers.
1. Capture: DISM /Capture-Image after sysprep.
2. Apply: DISM /Apply-Image, then bcdboot.
3. Service offline: DISM /Mount-Image, add updates/drivers, /Unmount-Image /Commit.
4. Generalise with sysprep.
5. Test the image.
reference machine → sysprep → capture WIM → apply → bcdboot
Context & applicabilityCommon mistakes · platform/version boundaries
- Forgetting
/Commitwhen unmounting, losing changes. - Leaving images mounted after errors — clean with
Dism /Cleanup-Mountpoints. - Adding updates in the wrong order (servicing stack first).
- Servicing an image index other than the one being deployed (
/Get-WimInfo).
Operational reference
Fast context before you go deeper.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Generalize the reference system before capture.
- Offline servicing adds drivers and updates without booting.
- Apply to correctly prepared partitions.
Get-ComputerInfo -Property BiosFirmwareType— UEFI or legacy BIOSGet-Disk | Select Number,PartitionStyle— GPT or MBRGet-Content C:\Windows\Panther\setupact.log -Tail 50— setup logdism /Get-WimInfo /WimFile:<install.wim>— images in a WIM
ReferenceHow it works1 section · depth on demand
In depth
Image-based deployment: build a reference machine, generalise it with sysprep, capture to WIM, apply to targets.
sysprep /generalize /oobe /shutdown
# boot WinPE on reference machine
Dism /Capture-Image /ImageFile:D:\images\win11-ref.wim /CaptureDir:C:\ /Name:"Win11 Ref 2026-11" /Compress:max
# on target (WinPE)
Dism /Apply-Image /ImageFile:D:\images\win11-ref.wim /Index:1 /ApplyDir:W:\
bcdboot W:\Windows /s S: /f UEFI
Keep reference images thin (OS + updates + runtime prerequisites) and install applications at deployment time, so images do not need rebuilding for every app update.
ReferenceImportant terms & boundaries1 section · depth on demand
Servicing workflow
Dism /Mount-Image /ImageFile:install.wim /Index:1 /MountDir:C:\mount
Dism /Image:C:\mount /Add-Package /PackagePath:C:\updates\ssu.msu
Dism /Image:C:\mount /Add-Package /PackagePath:C:\updates\lcu.msu
Dism /Image:C:\mount /Add-Driver /Driver:C:\drivers /Recurse
Dism /Image:C:\mount /Cleanup-Image /StartComponentCleanup /ResetBase
Dism /Unmount-Image /MountDir:C:\mount /Commit
Documented example, not captured output.
ReferenceConfiguration & state1 section · depth on demand
DISM image commands
dism /Get-WimInfo /WimFile:D:\sources\install.wim
dism /Mount-Image /ImageFile:install.wim /Index:6 /MountDir:C:\mount
dism /Image:C:\mount /Add-Package /PackagePath:update.msu
dism /Image:C:\mount /Add-Driver /Driver:C:\drivers /Recurse
dism /Unmount-Image /MountDir:C:\mount /Commit
dism /Capture-Image /ImageFile:C:\ref.wim /CaptureDir:C:\ /Name:Ref
dism /Apply-Image /ImageFile:ref.wim /Index:1 /ApplyDir:W:\
Documented example, not captured output.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Installation & Deployment → Windows Imaging. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows/deployment/ · confidence 94%