What is the DISM command?

Lakshmi Madhu

Lakshmi Madhu

Marketing Team

| 7 mins read

Published

17th January 2026

Last Update

22nd January 2026

Explore this content with AI:

When Windows behaves erratically, crashes, or fails to boot, administrators and power users often turn to the command line for solutions. While the System File Checker (SFC) is the most famous repair tool, it has a "big brother" that handles the heavy lifting when corruption runs deep. That tool is DISM. This guide provides a comprehensive look at the DISM command, detailing its functions, syntax, and critical role in maintaining a healthy Windows environment.

What is DISM (Deployment Image Servicing and Management)?

DISM command meaning

DISM (Deployment Image Servicing and Management) is a powerful Windows command line tool. It is used to service, repair, and prepare Windows images, including Windows Recovery Environment (Windows RE), Windows PE, and the active Windows installation on your PC.

Windows relies on DISM to maintain the health of its system files, especially when deeper corruption prevents other repair tools from working.

At its core, DISM works directly with Windows image files such as .wim, .vhd, and .ffu. Unlike basic file tools, DISM understands the internal structure of a Windows installation.

It allows you to:

  • Install or remove Windows features and packages

  • Add, update, or remove drivers

  • Repair corrupted system components

  • Update Windows images before deployment

DISM can operate in two modes:

  • Online mode (/Online) to repair the currently running operating system

  • Offline mode to service Windows images stored on a disk or network location

DISM is mainly used to repair Windows component store corruption. The component store (the WinSxS folder) contains the clean system files Windows needs to function properly. When this store is damaged, tools like SFC fail because there are no healthy files to restore from.

What are the common DISM commands and how to use them?

DISM commands

For most users, DISM is used to check for and repair system corruption. Here are the three primary commands used for system health:

1. CheckHealth

This command performs a quick check to see if corruption has already been detected. It does not scan deeply or repair any files.

DISM /Online /Cleanup-Image /CheckHealth

Use this when you want a fast status check.

2. ScanHealth

This command performs a thorough scan of the Windows component store for corruption. It takes longer than CheckHealth but does not fix issues, it only reports them.

DISM /Online /Cleanup-Image /ScanHealth

Use this if you suspect deeper system corruption.

3. RestoreHealth

This is the primary repair command. It scans the system and automatically repairs corruption by downloading clean files from Windows Update.

DISM /Online /Cleanup-Image /RestoreHealth

Use this to fix Windows update errors, system instability, or corrupted system files.

Beyond system repair, DISM is widely used by administrators to manage Windows images.

1. Apply a Windows image

Extracts a Windows image (.wim) and applies it to a specific drive or partition. Commonly used during manual or custom Windows installations.

Dism /Apply-Image /ImageFile:P:\MyImage.wim /Index:1 /ApplyDir:W:\

Applies the first index from MyImage.wim to the W: drive.

2. Capture a Windows image

Creates a backup of an existing Windows installation into a portable .wim file.

Dism /Capture-Image /ImageFile:C:\MyData.wim /CaptureDir:C:\ /Name:MyData

Captures the entire C: drive into MyData.wim.

3. Add drivers to an offline image

Allows you to inject hardware drivers into a Windows image without booting into the OS.  This is essential for systems that require special storage or network drivers.

Dism /Image:C:\mount /Add-Driver /Driver:C:\Drivers\mydriver.inf

Adds a driver to an offline image mounted at C:\mount.

4. Enable Windows features (Offline)

Enables Windows features in an image before deployment, such as .NET Framework or TFTP.

Dism /Image:C:\mount /Enable-Feature /FeatureName:TFTP

Enables the TFTP client feature in the mounted image.

5. Repair the current Windows system

This is the most commonly used DISM command for everyday users. It scans and repairs the currently running Windows installation.

Dism /Online /Cleanup-Image /RestoreHealth

Repairs the active Windows system using Windows Update as the repair source.

Why is DISM essential for Windows health?

DISM plays a critical role in maintaining the stability and reliability of Windows. Unlike basic troubleshooters, it works at the core system level to keep Windows healthy and functional.

  • Repairs the Windows component store (WinSxS): The component store holds essential system files used by Windows. Over time, it can become corrupted due to updates or failed installations. DISM is the only tool that can repair this store by removing damaged components and restoring clean files.

  • Prepares and manages Windows images:  DISM is the backbone of Windows imaging for IT professionals. It allows admins to create, modify, and deploy Windows images (WIM, VHD, FFU) efficiently, saving time and ensuring consistent system setups across multiple devices.

  • Works hand-in-hand with SFC:  SFC relies on the component store to fix system files. If that store is corrupted, SFC cannot work correctly. DISM repairs the component store first, ensuring SFC can successfully restore damaged system files.

DISM vs. SFC

While both tools help maintain Windows health, they operate at different levels: DISM repairs the underlying component store, while SFC focuses on individual system files.

Aspect

DISM (Deployment Image Servicing and Management)

SFC (System File Checker)

Primary role

Repairs the Windows component store (WinSxS)

Repairs individual system files

Level of operation

Works at the system image and component level

Works at the file level

Repair source

Uses Windows Update or a local image

Uses the local component store

When to use

When Windows Update fails or SFC cannot fix issues

For quick checks and basic system file corruption

Effectiveness

Fixes deep system corruption

Limited if the component store is damaged

Typical command

DISM /Online /Cleanup-Image /RestoreHealth

sfc /scannow

Recommended order

Run DISM first

Run SFC after DISM

What does DISM do? Advanced DISM operations and use cases

Power users and IT administrators can leverage DISM for complex tasks beyond basic system repairs, making it an essential tool for Windows maintenance, deployment, and customization.

Using a specific installation source (/Source) for repairs

If Windows Update is broken or internet access is unavailable, DISM /RestoreHealth will fail. You can force DISM to use a local file (like a Windows ISO or USB installer) as the source of healthy files:

DISM /Online /Cleanup-Image /RestoreHealth /Source:wim:D:\sources\install.wim:1 /LimitAccess

Mounting and unmounting an image for offline servicing

You do not need to boot a Windows image to change it. You can "Mount" a .wim file to a folder on your PC, browse the files like a normal directory, edit them, and then "Unmount" with the /Commit switch to save changes.

Adding or removing drivers, packages, and features

DISM allows for the granular management of the OS payload. This includes injecting massive driver packs for server hardware or stripping out consumer "bloatware" apps from an image before it is deployed to corporate devices.

Capturing and deploying custom Windows images

Organizations use DISM to create "Golden Images." After setting up a reference PC perfectly, DISM captures that state into a file. This file can be deployed to thousands of machines, ensuring they are identical to the reference PC.

Analyzing DISM log files for troubleshooting

When a command fails, DISM generates a detailed log file located at %WINDIR%\Logs\DISM\dism.log. Analyzing this text file can reveal exactly which driver failed to install or which specific system package is causing the corruption.

What are the best practices for running DISM commands

To avoid damaging your operating system, adhere to the following protocols:

  • Always use elevated permissions: DISM commands must be run from a Command Prompt or PowerShell window launched as "Run as Administrator."

  • Disable antivirus software temporarily: Aggressive antivirus software can lock system files or interpret the modification of Windows images as suspicious activity, causing DISM operations to fail.

  • Ensure a stable internet connection for online repairs: By default, /RestoreHealth relies on Windows Update servers. A dropped connection can corrupt the repair process.

  • Be patient and do not interrupt the process: It is normal for DISM to appear "stuck" at 20% or 40% for several minutes. Interrupting the process can leave the component store in an inconsistent state.

Conclusion

The DISM command is an indispensable utility in the Windows ecosystem. Whether you are an IT professional deploying hundreds of workstations or a home user trying to recover from a corrupted update, understanding DISM is key to system health. By mastering the differences between checking, scanning, and restoring health, and knowing how to utilize offline sources, you can resolve complex Windows errors that would otherwise require a complete operating system reinstallation.

Frequently asked questions

How long does the DISM /RestoreHealth command take to run?

toggle

The duration varies significantly based on the level of corruption, internet speed, and hard drive speed. It generally takes between 10 minutes and an hour. It is known to pause at certain percentage markers; this is normal behavior.

Does running DISM delete personal files?

toggle

No. DISM operates on system files and the Windows component store. It does not touch personal documents, photos, or applications located in user directories.

What should I do if a DISM command fails or gets stuck?

toggle

If DISM fails, check your internet connection first. If you receive an error indicating source files could not be found, you will need to use the /Source parameter to point DISM toward a valid Windows ISO or installation media matching your OS version.

Can DISM be used on all versions of Windows?

toggle

DISM is available on Windows 7 and later, including Windows 10 and 11. However, distinct commands and features may vary between versions. Always check documentation specific to your OS version if using advanced parameters.

Is it necessary to run SFC after a successful DISM repair?

toggle

Yes. DISM repairs the "master copy" of files (the component store). Once DISM completes successfully, you should run sfc /scannow to copy those repaired files from the component store to your active system folders.


0

Ready to transform your IT Management

1

Take the leap with SuperOps and take your IT management up to a whole new level.