DISM (Deployment Imaging Service and Management Tool) is a command-line utility built into Windows 10 that helps administrators and advanced users prepare, modify, and repair Windows system images. It is commonly used to fix corrupt system files, service the Windows image before deployment, and troubleshoot update failures. This article explains what DISM is, how it works, and provides step-by-step instructions for using it safely.
What Is DISM?
DISM is a command-line tool that ships with Windows 10 and Windows 11. It replaces older tools like PEImg and Intlcfg, and it is used to service Windows images (.wim or .vhd files) and to repair the running operating system. DISM can mount an image, add or remove drivers and language packs, enable or disable Windows features, and check the health of the system image. It is also the primary tool for repairing the Windows component store, which is the source of files used to update and repair Windows.
The tool is not a standard part of everyday consumer usage; it is designed for IT professionals and advanced users. However, Microsoft documents it thoroughly, and it is a safe, built-in utility when used correctly. DISM is not a third-party program, and it does not require an internet connection for basic health checks, though some repair operations may download files from Windows Update.
Why DISM Is Important
Windows 10 stores system files in the component store (located at C:\Windows\WinSxS). When system files become corrupted—due to failed updates, disk errors, or malware—the Windows Update service may fail. DISM can repair the component store itself, which then allows the System File Checker (SFC) to fix corrupted system files. This two-step process is a common troubleshooting sequence for blue screen errors, application crashes, and update failures.
DISM also plays a role in deployment. Organizations use it to create custom Windows images with preinstalled drivers and applications. For the average user, the most common use is the RestoreHealth command, which scans the system image for corruption and attempts to repair it automatically.
Prerequisites and Precautions
Before running DISM, you should back up important data, though the tool is generally safe. You must run Command Prompt as an administrator. To do this, search for “cmd” in the Start menu, right-click “Command Prompt,” and select “Run as administrator.” If you are repairing the running system, you need a stable internet connection for the online repair option, because DISM may download files from Windows Update.
DISM commands can take several minutes to complete, and the window may appear frozen. Do not close the Command Prompt or restart your computer during the operation. If you are using a laptop, keep it plugged in. For advanced scenarios, you may need a Windows 10 installation media (USB or ISO) to use the Source parameter, which points DISM to a known-good copy of the system files.
How to Use DISM: Step-by-Step
Here are the most common DISM commands for Windows 10, in order of increasing severity:
- CheckHealth: This command performs a quick check to see if the component store is marked as corrupted. It does not perform a repair and runs in seconds. Syntax:
DISM /Online /Cleanup-Image /CheckHealth - ScanHealth: This scans the component store for corruption and reports whether any issues are found. It does not repair anything. This scan can take 10-30 minutes. Syntax:
DISM /Online /Cleanup-Image /ScanHealth - RestoreHealth: This scans for corruption and automatically repairs any issues found. It may download files from Windows Update. This is the most common repair command and can take 20 minutes or more. Syntax:
DISM /Online /Cleanup-Image /RestoreHealth - RestoreHealth with Source: If Windows Update is unavailable or fails, you can specify a source image. You need a Windows 10 installation media. Syntax:
DISM /Online /Cleanup-Image /RestoreHealth /Source:D:\Sources\install.wim /LimitAccess(replace D: with your media drive letter).
After running RestoreHealth, you should run sfc /scannow to repair any corrupted system files that were identified. This is the standard troubleshooting sequence recommended by Microsoft support.
Common Errors and Troubleshooting
Users often encounter error codes when running DISM. Here are a few common ones:
- Error 87: The command-line syntax is incorrect. This usually means you mistyped the command or used the wrong parameter. Double-check the spelling and the slashes.
- Error 1392: The file or directory is corrupted and unreadable. This indicates a deeper disk problem, possibly a failing hard drive. Run
chkdsk /fto check for disk errors. - Error 0x800f081f: The source files could not be found. This means DISM could not locate the necessary files in the source location. If you are using a source, verify the path and the install.wim file.
- Error 0x800f0906: The source files could not be downloaded. This often occurs when Windows Update is blocked or unavailable. Try using the /Source parameter with installation media.
If you encounter persistent errors, you can view the DISM log file at C:\Windows\Logs\DISM\dism.log. This log contains detailed information about the operation and can help you diagnose the issue.
Advanced Usage: Servicing Images
Beyond repairing the running system, DISM can service offline images. This is useful for creating customized Windows installation media. For example, you can mount a .wim file, add drivers, and then commit the changes. Here is a basic workflow:
- Create a folder for mounting, e.g.,
C:\Mount. - Mount the image:
DISM /Mount-Wim /WimFile:C:\install.wim /Index:1 /MountDir:C:\Mount - Add a driver:
DISM /Image:C:\Mount /Add-Driver /Driver:C:\drivers\driver.inf - Commit the changes:
DISM /Unmount-Wim /MountDir:C:\Mount /Commit
This process requires administrative privileges and a basic understanding of Windows imaging. For most users, the online repair commands are sufficient.
Frequently Asked Questions
Q: Is DISM safe to run?
Yes, DISM is a built-in Windows tool. The /CheckHealth and /ScanHealth commands are read-only. /RestoreHealth modifies system files, but it is designed to repair corruption and is considered safe when run correctly.
Q: How long does DISM take?
CheckHealth takes seconds. ScanHealth can take 10-30 minutes. RestoreHealth can take 20 minutes or more, depending on the amount of corruption and your internet speed.
Q: Do I need to run SFC after DISM?
Yes, it is recommended. DISM repairs the component store, while SFC repairs corrupted system files using the component store. Running SFC after DISM ensures that all corruption is fixed.
Q: Can DISM fix all Windows problems?
No. DISM can repair system image corruption, but it cannot fix hardware issues, malware infections, or driver problems. It is one tool in a broader troubleshooting toolkit.
Q: What if DISM fails to repair?
If RestoreHealth fails, you may need to use the /Source parameter with installation media, or consider a repair install (in-place upgrade) or a clean installation of Windows.
Q: Does DISM work on Windows 11?
Yes, DISM is also available in Windows 11, and the commands are nearly identical. The instructions in this article apply to both Windows 10 and Windows 11.