Introduction:
DISM stands for Deployment Image Service and Management. It is a built-in executable command-line tool used to fix the mount of the Windows image from the .wim file, .ffu, .vhd file, or a .vhdx file and also upgrade the operating system running.
If you are facing problems like error code 0xc000021a, windows media player not working, or some particular application or operation is deviant. Then using the DISM could help you fix the issue related to any of the corrupted system files, which might be causing you unnecessary errors.
Similar to that of the DISM. There is one more command-line tool which is the SFC Scan. Here SFC stands for the System File Checker.
SFC helps restore the older cached copy to fix the registry. And if the system file source cache is also corrupted, then DISM help correct the issue from the roots.
But today, in this article. We won’t be talking about SFC. But DISM, and fix the error code 87 preventing us from completing the DISM cleanup.
What is DISM error code 87?
DISM error code 87 is the direct result of the failure of the DISM clean-up command due to either faulty commands or system failure.
What is Causing DISM Error 87 on Windows 10?
DISM error code 87 in most cases is caused due to wrong spaces given in the command. You have to make sure you use a properly defined order. Running the commands in the Command Prompt or Power Shell is also a cause of DISM error code 87. Some other reasons that could be troubling you are as follow:
Command-Line not Written Accurately:
The main reason behind getting the DISM error code is the mistaken command. And a lot of people do mistakes in entering the commands correctly and thus end up getting the error codes.
Due to Windows 10 Bug:
Windows 10 bug results in the Windows ending up getting a blue screen addressing your system running into a problem and needing to restart.
And this error you can easily fix this by updating Windows to the latest operating system.
Command not Running Into an Elevated Prompt/Not Admin Permissions:
Many peoples get confused when asked to run the command with administrative privileges. And they run it without giving the approvals of overtaking the default configurations. And due to the same many commands which require root privileges fail.
Outdated OS:
The primary cause for any system crash circulates the Windows Operating System. And if you do not keep it updated. Then it will create problems, now and then. So the first and foremost thing to fix and avoid any issue is to keep the Windows OS updated.
Damaged Windows Installation:
If you have damaged windows installed. Then you will probably be facing problems in running any command in the command prompt, including the DISM command.
To run the commands without errors. It is crucial to avoid having a damaged window installed. And if you have one. Then you should delete and install the windows again.
Incorrect Version of Deployment Image Service and Management:
An incorrect version of Deployment Image Services and Management can also be one of the reasons causing you the error code 87.
So, if you are trying to use the outdated DISM image to fix the issue for your system. Then you will be fetching the error code 87.
And the only solution to fix this issue is to use the proper version of DISM to fix your Windows.
How to fix the DISM error code 87 on Windows 10?
So, if you are facing the DISM error code 87… And do not know what is next to do. Then follow the below-mentioned solutions and get it fixed for you in no time.
Beneath, we have mentioned all the possible solutions to fix the DISM error code 87.
Solutions to fix the DISM error code 87
- Use the Correct Spacing
- Use An Elevated Command Prompt
- Installing Pending Windows Updates
- Use the Windows 10 Version of Deployment Image Service and Management (if applicable)
- Perform A Repair Install
- Reinstall Windows
- Run System File Checker
- Run Windows Update Troubleshooter
- Running the CHKDSK Tool
- Repairing Windows
- Scan Windows PC with Microsoft Security Essentials
- Create New Partition & Reinstall the Windows
Use the Correct Spacing:
So, before doing anything. The first and foremost thing you need to do is to check if you have correctly entered the commands with proper space and letters. And for this, you can refer to the DISM command below:
DISM Command: DISM /Online /Cleanup-Image /CheckHealth
Make sure you have written the commands correctly, and then try again. Now check if this solution fixes the issue for you. If yes, then great. And if not, follow the next solution.
Use An Elevated Command Prompt:
If you do not use the Command prompt with the root privileges. And use the regular command prompt. Then probably you will get to see the same error even if you use the correct command without mistakes. So, how can you achieve this? Follow the instructions below to run the Command Prompt with the root privileges.
- Open the search panel of your windows.
- Search Command Prompt.
- Now, from the menu given for the Command Prompt, select Run as Administrator.
And this is how you do it. Now run the same DISM command and see if this works for you. If not, move to the next solution.
Installing Pending Windows Updates:
If you wish to keep your system free from errors and crashes. Then you must keep on updating the windows constantly. It minimizes the chances of unnecessary errors getting to you.
- To check if your windows are updated, follow the instructions beneath.
- Open the Windows Settings.
- Locate the Windows update option.
- Click over a check for updates.
Install the updates if found any. And if not, move to the next solution.
Use the Windows 10 Version of Deployment Image Service and Management (if applicable):
This tool can be used to scan and repair potential problems with the .wim store in Windows that may influence system files. It can mount Windows images in .wim, .vhd, or .vhdx format, and can be used to address issues in the presently installed Windows operating system.
The System File Checker tool analogizes those files against the .wim store that is saved on the system. If this store is corrupted, the repairs may not resolve the problems of the system. The DISM tool has some modifiers that can examine and mend the .wim store based on parent copies stored on Microsoft’s update servers, making it useful to operate in conjunction with a system file check.
Modifier & Description:
/online – Signifies that you are modifying an online image
/cleanup-image – Begins a more extensive check which can resolve issues with the store]
/checkhealth – Starts a primary check to see if corruption has been detected in the store
/scanhealth – Serves a more comprehensive scan of the store for corruption
/restorehealth – Scans the store for corruption and also fixes corrupted files
As an example, the following command would begin a scan of an online image to check the Windows store for corruption and rectify any that it finds:
{dism /online /cleanup-image /restorehealth}
The command does not always check the files with the parent copies kept on the Windows Update servers by default, and adding the /online modifier does not allow the computer to drag from the Windows Update server with it disabled. If the online functionality is disabled, you may run the command and get an error displaying that it was unable to find the source file. To enable the option:
- Open the Local Group Policy Editor by typing gpedit.msc into the start menu search bar and press Enter.
- Navigate to Computer Configuration>Administrative Templates>System>Specify settings for optional component installation and component repair then double-click on it to open the settings window.
- Set the process to enable, and in the Options section look for the option tagged Contact Windows Update straight to download repair content instead of Windows Server Update Services (WSUS) and check the box.
Under good conditions, the command will take about 10-20 minutes to run, but depending on circumstances it can potentially take about or over an hour.
Perform A Repair Install:
To perform a repair install on your windows, you will be required to have an ISO file. Okay so, before getting an ISO file. Let’s have a quick overview of what it is actually.
An ISO file is an identical manuscript of the optical disk. To get an ISO image for your system, follow the instructions below:
- Download the Media Creation Tool from the Official Windows Microsoft page.
- Click the download button under the Create Windows Installation Media.
- Launch the Media Creation Tool, approve all the terms and select Create Installation Media.
- Select the options according to your device.
- Select the ISO file when asked to choose the output format.
- Click finish and complete the process and note the location of the ISO file.
Now, we’ll run the repair install.
Before this, make sure you remove all the devices plugged in with your system to ensure device safety.
To run the repair, follow the instructions below:
- Locate the ISO file.
- Right-click on it and select the Mount option.
- Double-click the set-up.exe file from the ISO-mounted folder.
- Now, go to Windows Settings.
- Open the Update and Security options and select the Recovery option.
- Click Get Started to start the installation.
Reinstall Windows:
Reinstalling could help you fix the issue in the case.
And Reinstalling the windows resolves the damaged and missing registry items. And once you reinstall it. The issue will be resolved probably. To reinstall the windows, follow the below steps:
- Open the Windows Settings.
- Go to the Update and Security option and select recovery.
- Now click Get Started.
Let the process complete and then see if the issue is fixed for you.
Run System File Checker:
Till now, if you were unable to fix the issue with DISM error code 87. Do not worry.
Try running SFC, the System File Checker, which will help you resolve the registry and all the corrupted files, thus allowing you to reach the DISM image and fix it.
So that it won’t become an issue for the DISM. It will not only help you get to resolve the issue. But also help you to scan your PC a while to check if there are any corrupted files. To run the SFC scan on your system, follow the instructions below:
- Open the Command Prompt with the administrative privileges.
- Now, type in sfc /scannow and hit enter.
Once you do it, your computer will start looking for any broken or corrupted files and will replace them with the correct ones for you.
Note – Use Safe Boot to avoid any issues.
To put your system in the Safe Boot, follow the instructions below:
- Open the Run utility.
- Now, in the input window. Enter msconfig and hit enter.
- Go to the Boot tab and select Safe boot.
Your system will ask you to Restart your system or Continue without restarting. Choose to restart your system. Once you’ll do, it will appear to you in a different window. Now from there, you can open the Command prompt, and it will automatically open with the administrative privileges. So you don’t need to do it. And just run the command as we were doing earlier.
Run Windows Update Troubleshooter:
Due to any issues, if you are unable to update your windows system typically, Try running the Windows Update Troubleshooter, which will help you fix the error with Windows Update.
To run the windows update troubleshooter, follow the instructions below:
- Open the Windows Settings.
- Go to the Update and Security.
- Scroll down, and select troubleshoot.
Run the troubleshooter and complete the process. And again, try updating your windows system.
Running the CHKDSK Tool:
CHKDSK is a Check Disk Option used to Detect and corrects disk errors. CHKDSK scans your hard disk and provides a clean report for it and corrects the file errors. This process comparatively takes extra time to complete. It can take a few minutes to hours in completing.
Note – Do not try interrupting the process by any means, or it will generate more problems for you. So, don’t interrupt the process unless you get a crash message.
- To run CHKDSK, follow the instructions below:
- Go to Start.
- Select My Computer.
- Now right-click the drive and open properties.
- Go to the Tools tab.
- Now, check the error checking.
- And off both the options in the pop-up check disk window.
- Now, just start the process by clicking the start button.
If you get an error saying Windows can’t check the disk while it’s in use. Click the Schedule Disk Check.
You can also run the CHKDSK command from the command prompt after giving the root privileges.
Repairing Windows:
Till now, if you were unable to resolve the issue. Then you should try repairing your windows system as there could be some damaged system files. You can do this by running the Startup Repair from the advanced options.
If you want to get to the advanced options of your core system, then you will be required to open the boot options for your windows. To open the boot options, switch off you’re and turn it on back in. Now, you don’t need to wait for it to turn on. Instead, as you start your system, start hitting the unique function key to open the boot options. If you do it correctly, then the boot options screen will open up on your screen.
Now, do the following steps:
- Enter the windows recovery environment.
- Look for the Troubleshoot option.
- And click enter.
- Now select Advanced options.
- Select the Startup Repair.
Note – You can search the function key for your particular device to launch the boot options.
Scan Windows PC with Microsoft Security Essentials:
Try fixing the issue with Microsoft Security Essentials. It may be helpful to you in repairing the DISM error code 87 on your computer. To run the Microsoft Security Essentials scan on your windows device, follow the below instructions:
- Click the Start Button.
- Now, go to All the Programs.
- Open the Home tab.
- Select the preferred scan.
- And, hit scan now.
It will scan all the threats and fix all of them for you.
Create New Partition & Reinstall the Windows:
If you want to create a partition without Windows pre-installed on the hard drive, you can use a Windows installation disc to run Diskpart. These specific steps can help you out:
- Insert the installation disc, and then boot your computer from it.
- At the Windows Setup screen, press SHIFT+F10 simultaneously to open a command-line prompt. Use of the NEW button to create partitions, it will generate a system partition for an MBR disk.
- Type “
Diskpart
” and press Enter. - At Diskpart, you need to run a few lines of commands to create a new partition:
- List disk
- Select disk [disk number]
- Create partition primary [size=n]
- Then you will have created a partition of around 30GB. You can use this command to create more partitions or exits.
If the hard drive has enough space, then it is recommended to allocate more than 100GB to the system drive because Windows updates, installed programs, and other system files will keep consuming space on the system partition. If you don’t have a Windows installation disc, then you can use third-party free partition manager software to create a partition without an operating system.
Conclusion:
DISM is a very useful tool to clean up your windows and recover corrupted and damaged files from your system. And if you face any lags or crashes on your system. Then, you should try running the DISM attack to recover any corrupted and damaged files.
I hope this article was helpful to you in fixing the error code 87 with the DISM command. And if not, then try reaching out to the closest windows restoring store to avoid any severe damage to your system.