Deployment Image Servicing and Management (DISM) is a tool which is used to scan and fix the WIM store issues which can affect Windows system files. DISM is a command-line tool and used with the Administrative privileges which mean normal users can not use it. It can run currently running Windows operating system files as well as
.vhdx files. Dism can be run in MS-DOS or PowerShell without a problem.
Dism Command Requires Elevated Permissions (Administrator Mode)
Before using Dism we need to know that Dism requires Administrative privileges. For example when we try to get help information with the
/? we will get
Error: 740 Elevated permissions are required to run DISM.. So we will start the MS-DOS terminal with Administrative privileges in normal user desktop.
First, we will write the
cmd command to the
Start Menu like below and then right-click to the
Command Prompt app which will open a menu. Then click to the
Run as administrator which will open the MS-DOS in Administrator mode.
Dism provides different imaging commands to enumerate, install, uninstall, configure, update. We can list these commands and get information about them with the
/? option like below.
Scan Image For Problems Faster
Windows operating system components can be scanned with the following command.
/CheckHealth option will scan faster way with fewer details.
> dism /Online /Cleanup-Image /CheckHealth
Scan Image For Problems Slower and Detailed
If we want to scan more detailed way the Windows files or Image we can use
/ScanHealth option. This option process will take some time to complete but will provide a more detailed scan result.
> dism /Online /Cleanup-Image /ScanHealth
Scan and Repair Automatically
If there are problems we can repair them automatically with the
> dism /Online /Cleanup-Image /RestoreHealth
Specify Windows Partition
While using dism the current partition will be used to scan Windows operating system files. We can also specify different partitions for Windows operating system files. We will specify the partition with the
/Image: option by providing a partition letter. In this example, we will scan the Windows operating system files in partition
> dism /Online /Image:D /Cleanup-Image /ScanHealth
Repair From Specified WIM File
While repairing we can use a drive or path in order to specify WIM file. We can specify the WIM file location with the
/Source: option and provide the path. In this example, we will use
D:\install.wim as WIM file to repair.
> dism /Online /Cleanup-Image /RestoreHealth /Source:D:\install.wim