Whether you have a great gaming PC, one of the best laptops, or even a mini PC, Windows will somehow still find a way to give you unexpected errors. There are many ways to fix these random issues, but DISM (Deployment Image Servicing and Management) commands are something most people aren’t familiar with. System admins regularly use DISM to configure, tweak, and repair system images.
However, you don’t need a degree in IT to use these helpful commands to solve a wide variety of system problems. They’re easy to use, and can sometimes even help in fixing a Windows BOSD. Here’s a look at how these commands work and the various ways you can use them.
8 common reasons why your PC is struggling and how to fix it
Is your PC running slow? I may have the answer!
What is DISM?
A helpful command-line tool
If you are interested in a more technical understanding of DISM, here’s the gist of it: DISM mainly works by managing data included in the Windows image. That image is a compressed representation of the Windows operating system, including system files, boot configuration, and drivers.
DISM helps take account of updates, drivers, applications, and corrupted files within that Windows image. It can be used to check system health, scan for serious issues, and repair damaged files. This command tool can be used with multiple options, such as CheckHealth, ScanHealth, and RestoreHealth. We’ll touch on all these in their respective sections.
Using DISM commands won’t erase your data or programs, but we still recommend you back up Windows as you will be making system changes.
Check System Health Using DISM
Just a general checkup
This is the most basic command that you can use with DISM. The DISM CheckHealth command searches for any file corruptions in the local Windows image. Think of it as a diagnostic tool that helps you troubleshoot potential issues and their causes. Just remember that it won’t fix any issues on its own, it just identifies them.
1. From the Start menu, search for Command Prompt.
2. Right-click the first result, and select Run as administrator.
3. Type or Copy/Paste the following command, then hit Enter.
DISM /Online /Cleanup-Image /CheckHealth
After you hit Enter, the DISM tool will run the CheckHealth command and look for any data corruption within the local image. If the command doesn’t find any issues, it will say “No component store corruption detected.” On the other hand, if it does find any corruptions, it will say “The component stored has been corrupted.”
Advanced System Image Scan Using DISM
Checking for deeper issues
While the CheckHealth option works well as an initial diagnostic tool, the ScanHealth option will perform a more advanced scan that searches deeper for component store corruption. It will also save the report to a log file. Here’s how you can use it:
1. From the Start menu, search for Command Prompt.
2. Right-click the first result, and select Run as administrator.
3. Type or Copy/Paste the following command, then hit Enter.
DISM /Online /Cleanup-Image /ScanHealth
This process takes a bit longer than the CheckHealth command. You should see a progress bar indicating the completion percentage. If any issues are detected after the scan is complete, you can run the RestoreHealth command to repair the Windows image.
Repair the Windows system image
Helpful for BSODs and data corruption
If you find any file or data corruptions after running CheckHealth or ScanHealth health commands, your next step is to run the RestoreHealth command. This command makes use of Windows Update to search and provide the necessary files required for fixing file corruptions. It repairs the Windows 11 system image but requires you to be connected to the internet.
1. From the Start menu, search for Command Prompt.
2. Right-click the first result, and select Run as administrator.
3. Type or Copy/Paste the following command, then hit Enter.
DISM /Online /Cleanup-Image /RestoreHealth
This process takes a bit longer than the CheckHealth command. You should see a progress bar indicating the completion percentage. The RestoreHealth command should help repair the Windows image.
Repair system image using Windows installation media
Handy if you don’t have internet access
If your computer is not connected to the internet or the Windows Update component itself is corrupt, RestoreHealth can’t do much on its own. Fortunately, you can mount a Windows ISO or use Windows installation media to fix the system image.
To do so, you’ll have to first use the Media Creation Tool to create the ISO file. After you create the ISO file, don’t run the setup process. Instead, follow the steps below.
1. Double-click the ISO file from the folder you saved it to earlier. This will mount it to your DVD Drive. Take note of the letter assigned to the drive. In our case, the drive letter is “D:”.
2. In the Start menu, search for Command Prompt once again, right-click it, and select Run as administrator.
3. Type or Copy/Paste the following command and hit Enter. Make sure to replace “D:” with the drive letter of your own Windows ISO file.
DISM /Online /Cleanup-Image /RestoreHealth /Source:D:\Sources\install.wim
This process will take the longest yet to complete. The command scans and repairs problems using the “install.wim” file within the Windows installation media.
Repair Windows installation with the SFC Utility
Scan and replace corrupted files with the installation
The DISM commands you used above focus on repairing the system image and source files, not the actual installed copy. After fixing issues with the system image, you can use the System File Checker (SFC) command tool to fix any issues with your Windows 10 or 11 installation. It’s highly recommended that you run an SFC scan nearly every time you use DISM image repair commands.
1. From the Start menu, search for Command Prompt.
2. Right-click the first result, and select Run as administrator.
3. Type or Copy/Paste the following command, then hit Enter.
SFC /scannow
After running the command above, the System File Checker utility will begin to verify the system file integrity to check for any corruption. If the Command Prompt seems stuck, try pressing Enter on your keyboard a couple of times to refresh the Window.
Leveraging DISM and SFC commands
Both the DISM and SFC commands make it easy to scan and repair any issues with corrupted files. While using the command prompt might seem technical to some people, it’s as easy as finding the right commands and copying/pasting them into the terminal. However, if your problem is more to do with performance rather than Windows itself, check out our guide on fixing performance issues on Windows 11.
Courtesy of XDA Developers