DISM, short for Deployment Image Servicing and Management, is the Windows command-line tool that inspects, modifies and repairs Windows images, either the running operating system or an offline image stored in a WIM, ESD, VHD or VHDX file. It adds and removes packages, drivers, optional features and capabilities, captures and applies images, and repairs a damaged component store.
In the PowerShell & command line toolkit for Windows administration, DISM is the servicing engine behind deployment and repair. It runs as dism.exe from an elevated Command Prompt or PowerShell session, and the same functions are exposed as cmdlets in the built-in DISM PowerShell module. It replaced several older tools, including Package Manager and PEimg, starting with Windows 7 and Windows Server 2008 R2.
How DISM services online and offline images
DISM always works against a target image, and the first choice in any command is which image that is. The /Online switch targets the currently running installation, while /Image:<path> targets an offline Windows directory, typically a WIM file mounted into an empty folder. Offline servicing changes a reference image before deployment, so every device built from it inherits the change.
Under the hood, DISM calls the Component-Based Servicing stack, the same engine that Windows Update uses. Packages land in the WinSxS component store, and DISM records each operation in C:\Windows\Logs\DISM\dism.log, with deeper servicing detail in CBS.log. A mounted image stays locked until it is unmounted with either /Commit to save changes or /Discard to drop them.
The table below lists the image formats DISM handles and their typical role.
| Format | Description | Typical use |
|---|---|---|
| WIM | File-based image with single-instance storage | Reference images and installation media |
| ESD | Highly compressed, often encrypted WIM variant | Windows Update and media downloads |
| VHD and VHDX | Virtual hard disk containing a full volume | Virtual machines and native boot |
| FFU | Sector-based full flash update image | Fast factory deployment of whole disks |
| Online system | The running Windows installation | Repair and feature changes in place |
Essential DISM commands and options
DISM commands follow a verb-noun switch syntax such as /Get-Features or /Add-Driver, each combined with the target switch. The following table groups the commands administrators use most often.
| Command | Purpose | Example context |
|---|---|---|
| /Get-ImageInfo | Lists the indexes and editions in an image | Picking the right index to mount |
| /Mount-Image | Mounts an image index to a folder | Offline servicing of a reference image |
| /Add-Package | Installs a CAB or MSU update | Slipstreaming cumulative updates |
| /Add-Driver | Injects INF-based drivers | Storage or network drivers for new hardware |
| /Enable-Feature | Turns on an optional feature | Adding .NET Framework 3.5 or Hyper-V |
| /Add-Capability | Installs a Feature on Demand | Language packs or RSAT tools |
| /Cleanup-Image | Checks, repairs and trims the component store | Fixing failed Windows updates |
| /Capture-Image and /Apply-Image | Creates or deploys a WIM from a volume | Custom deployment without a full toolkit |
Most commands accept helpful modifiers. /LimitAccess stops DISM from contacting Windows Update, /Source points to local repair files, /Recurse adds every driver in a folder tree, and /Quiet with /NoRestart makes DISM suitable for unattended scripts.
Repairing Windows with DISM and System File Checker
DISM repairs the component store, while System File Checker repairs protected system files from that store, so the two tools are used in a fixed order. If the store itself is corrupt, sfc /scannow copies damaged files from a damaged source, which is why administrators run DISM first and SFC second.
The three health options of /Cleanup-Image differ greatly in depth and duration, as the next table shows.
| Option | What it does | Typical duration |
|---|---|---|
| /CheckHealth | Reads the corruption flag already recorded | Seconds |
| /ScanHealth | Scans the store for corruption without fixing it | Several minutes |
| /RestoreHealth | Scans and replaces damaged components | Ten minutes to over an hour |
| /StartComponentCleanup | Removes superseded component versions | Minutes, depending on store size |
| /ResetBase | Makes current updates permanent and frees space | Minutes; updates cannot be uninstalled |
By default, /RestoreHealth downloads replacement files from Windows Update. On isolated networks, administrators supply a matching source, for example /Source:wim:D:\sources\install.wim:1 /LimitAccess. The source must match the build and edition of the damaged system, or the repair fails with a source-files-not-found error.
DISM compared with related command-line tools
DISM overlaps with several neighbors in the Windows command line, but each tool owns a distinct layer. The table below separates their responsibilities.
| Tool | Main responsibility | Relationship to DISM |
|---|---|---|
| DISM | Servicing and repairing Windows images | Repairs the component store |
| System File Checker | Verifying protected system files | Depends on a healthy component store |
| DISM PowerShell module | Object-based access to the same functions | Cmdlets such as Repair-WindowsImage |
| diskpart | Creating and formatting partitions | Prepares volumes before Apply-Image |
| winget | Installing desktop applications | Does not service Windows components |
In PowerShell scripts, the module cmdlets such as Mount-WindowsImage, Add-WindowsDriver and Enable-WindowsOptionalFeature are often preferable because they return objects that can be filtered and piped, whereas dism.exe returns text that must be parsed.
Limitations and common DISM mistakes
Most DISM failures come from version mismatches and interrupted sessions rather than from the tool itself. A host can service images of the same or older Windows versions, but servicing a newer image usually requires the DISM version from the matching Windows ADK.
- Running DISM without elevation produces error 740 instead of a result.
- A mount left open after a crash must be cleaned with
/Cleanup-Mountpointsbefore the folder can be reused. - Using
/ResetBaseremoves the ability to uninstall existing updates, so it suits finished reference images rather than production servers under change control. - Antivirus scanning of a mounted folder can slow servicing dramatically or cause commit failures.
- Repairing with a source of a different build or edition leaves corruption in place.
The simple explanation
Think of a Windows installation as a large, carefully organized warehouse of parts. DISM is the warehouse manager: it can list what is on the shelves, add new parts, remove old ones and replace broken ones with fresh copies.
It can work on the warehouse that is open for business. That is the running computer. It can also work on a blueprint copy used to build many new computers. When Windows updates keep failing, DISM often restores the spare parts. Then the system can fix itself.
How it is used in practice
An IT team at a school district prepares one Windows 11 reference image for 1,200 classroom laptops. A technician mounts index 3 of the WIM file with /Mount-Image, injects the network and storage drivers with /Add-Driver /Recurse, adds the latest cumulative update with /Add-Package, enables .NET Framework 3.5 for a legacy grading application and commits the result.
Two months later, several laptops stop installing monthly updates. The help desk runs DISM /Online /Cleanup-Image /RestoreHealth with the district’s install.wim as the source, followed by sfc /scannow. Both tools report successful repairs, and the pending update installs on the next attempt, avoiding a full reimage of each affected laptop.