If you have used the System File Checker on your Windows PC, you probably also know about the Deployment Image Servicing and Management (DISM) command-line tool. DISM is a crucial tool that enables you to easily keep annoying errors at bay. DISM /Online /Cleanup-Image /RestoreHealth in Windows is one of its commands that allow you to do so. Today’s article will explain what this command does and other things about it that you should know.
What Is DISM /Online /Cleanup-Image /RestoreHealth?
DISM /Online /Cleanup-Image /RestoreHealth is a DISM command that carefully and thoroughly scans your operating system for corrupted files that may trigger random issues. It then automatically repairs the discovered files, boosting your computer’s health.
What Does DISM /Online /Cleanup-Image /RestoreHealth Do?
Before initiating the scan, this command first ensures DISM only targets the running operating system, not a virtual hard disk (vhdx or .vhd) or an offline Windows image (.wim). It then conducts recovery operations and scans your system to find corrupt files and repair them.
Therefore, if you often get random errors on your computer, this command could help eliminate them.
Pro Tip: Run a dedicated PC optimization tool to get rid of incorrect settings, junk files, harmful apps, and security threats that can cause system issues or slow performance.
How to Use the DISM.exe /Online /Cleanup-Image /RestoreHealth Command
To resolve errors on your PC using this command, follow the instructions below:
- Press the Windows logo key + S combination.
- When the search box opens, type in “command prompt” (no quotes).
- Right-click on the Command Prompt search result and choose “Run as administrator”.
- Click on the Yes button when the User Account Control prompt pops up.
- Type “DISM /Online /Cleanup-Image /RestoreHealth” (without quotes) into the CMD window.
- Then hit Enter to start the scan.
- Wait for the process to complete, and restart your machine.
How Long Does DISM RestoreHealth Take?
Once the scan begins, it shows a percentage (0-100) indicating its progress until it’s done. However, the scan sometimes seems stuck as the percentage remains the same for a while. This causes some people to get impatient and cancel the process.
It’s pretty normal for the scan to appear stuck. This mostly happens when the command has many errors to fix, thus needing more time. Generally, the scan takes about 10 minutes but could extend to a few hours. Therefore, always give it time to complete the process because canceling it forces you to repeat the entire process. Furthermore, you can continue using your device as the tool runs.
Why Do I See Error 87 When Performing the /Online /Cleanup-Image /RestoreHealth Scan?
You may encounter DISM /Online /Cleanup-Image /RestoreHealth error 87 when running a DISM scan for the following reasons:
- An outdated operating system
- Corrupted system files
- The incorrect DISM command
Fortunately, this error is easily fixable with the proper workarounds. Below are the most effective ways to remove it from your computer. Apply them in the presented order to avoid making unnecessary changes to your device.
Let’s dive right in.
1. Check for Errors in the Command
The online /cleanup-image /restorehealth command has several slashes and spaces. Leaving out one of these can easily trigger error 87, stopping you from running any scan. Therefore, check for errors in the command before hitting Enter to ensure better results.
Also, make sure you run the command in an elevated command prompt. Doing so gives the command the needed privileges to scan your system and fix damaged files.
Follow these quick steps:
- Click on the search box in the bottom-left corner of the screen and type in “command prompt” (no quotes).
- Choose the “Run as administrator” option on the right-side menu.
- Select Yes in the UAC window.
- Now execute the command, and everything should work fine.
If the error reoccurs, then you are probably dealing with a more serious issue. So, proceed to the following method to see if it helps.
2. Update Windows
If your operating system is outdated, then it likely contains bugs that may cause error 87. Installing the latest Windows updates could solve your problem.
These instructions will guide you through updating Windows:
- Use the Win + I keyboard shortcut to summon the Settings application.
- When it opens, go to the Update & Security section.
- On the right side of the window, click on the “Check for updates” button.
- Windows will check for any available updates and automatically install them on your computer. If you see any optional updates listed, install them too for better results.
- Once done, restart your PC to finish the installation.
- Now check if the error has been fixed.
3. Run the System File Checker
Corrupted system files are a major cause of many Windows 10/11 errors, including error 87. Luckily, the System File Checker can repair these files. This tool scans all the protected system files on your system and automatically replaces the corrupt ones.
Here is how to use this tool on your PC:
- Right-click on the Windows logo in the bottom left corner of your screen.
- Choose “Run” from the Quick Link menu. Alternatively, use the Windows logo key + R combination to open Run.
- Once the Run dialog box opens, type in “sfc /scannow” (without quotes) and hit Enter.
- Wait for the scan to finish.
- Then restart your device and check if you can run DISM /Online /Cleanup-Image /RestoreHealth successfully.
Don’t give up if you still can’t perform the DISM /Online /Cleanup-Image /RestoreHealth scan. The following method might work for you.
4. Use the CHKDSK Tool
This Windows tool allows you to scan your hard drive for existing errors or bad sectors and automatically fix them. So, using it might resolve error 87.
To run the CHKDSK tool, use this simple guide:
- Type “cmd” (no quotes) into the Windows search box.
- Right-click Command Prompt and choose the “Run as administrator” option.
- Once the UAC prompt box appears, click Yes to launch CMD as an administrator.
- Next, type in “chkdsk” (without quotes) and press the Enter key.
- Wait for the process to finish. Note that the scan might take a few minutes or even hours depending on the number of errors it finds. Therefore, make sure to perform it when not busy on your computer. Canceling it might cause even more errors. Only cancel it if you see an error message. Otherwise, be patient.
5. Use a Professional Repair Tool
Using a professional PC repair tool helps perform thorough scans to find the hidden issues causing endless problems on your machine. Outbyte PC Repair is excellent repair software that has proved its reliability and efficiency. This app scans your computer for system malfunctions, outdated caches, and other performance-affecting problems and automatically eliminates them. This allows your machine to function error-free. It also gets rid of tracking cookies that monitor your activity and sell your data to third parties.
If you want to use this tool to boost the performance, privacy, and security of your device, then follow these steps to install it:
- Visit the Outbyte PC Repair page to download it.
- Double-click on the setup file to begin the installation process.
- Click Yes when the User Account Control window opens.
- Select where to install the program. You could also tick the checkboxes for the optional features you want.
- Then choose “Click to install”.
- Let the installation complete, and then select the option that says “Launch PC Repair and Scan PC”.
- Click on the Finish button. The app will open and automatically start scanning your computer for issues.
- All the discovered issues will be listed on the right side of the window. You can then view them and take the desired action.
- Close the app once done and restart your computer to see the improved performance.
6. Use System Restore
System Restore is a special Windows feature that allows you to revert your computer to a specific point in time. It can be a lifesaver if you have recently made some changes that caused issues on your computer and don’t know how to undo them. However, you need an existing restore point to fall back on. So, if you have never used System Restore, then you probably don’t have a restore point to apply.
If you had created a restore point before you first experienced error 87 on your device, use this guide:
- Go to the Windows search bar in the bottom left corner of your screen and type in “restore” (without quotes).
- Choose “Create a restore point.”
- As soon as the System Properties page appears, click on the System Restore button. If the button is greyed out, you don’t have a restore point to use.
- Click on the Next button.
- Choose a restore point to apply. Make sure you verify the date. If you can’t see the restore point you want, select the “Show more restore points” checkbox.
- Select “Scan for affected programs” to see the apps that will be removed from your device.
- Click Close, then choose Next.
- Click on the Finish button to start the process. Once complete, you should be able to perform the dism online checkhealth scan without any issues.
How to Prevent Error 87 From Reoccurring in Windows 10/11
Error 87 is pretty annoying, so you should do whatever you can to ensure it never appears on your system. One of the best ways to do so is by regularly updating Windows to keep the system bug-free. You could also reinstall Windows, especially if the error reappears even after removing it using the above methods.
This article has covered everything you need to know about the RestoreHealth command. If you have any queries about this command, make sure to comment below. Also, check out our blog for more articles like this one to help you troubleshoot any Windows error you may be facing.
John is a tech enthusiast who loves to explore and improve the latest technology. He shares his knowledge and opinions on the latest gadgets, apps, software, and games on Software Tested. With years of experience in writing about technology, John has a keen eye for identifying new and noteworthy products. His articles offer in-depth, opinionated insights for both tech enthusiasts and casual readers alike.