12 Fixes For DISM Error 87 On Windows

Introduction:

DISM stands for the Deployment Image Service and Management. It is a built-in executable command-line tool used to fix the mount the Windows image from the .wim file, .ffu, .vhd file, or a .vhdx file and also upgrade the operating system running. 

DISM error code 87 on Windows

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 that 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 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 of the 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 to end up getting a blue screen addressing your system ran into a problem and needs to restart. 

And this error you can easily fix 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 fails.

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.

See also  19 Best Fixes When Windows 10 Can't Find WiFi Network

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

  1. Use the Correct Spacing
  2. Use An Elevated Command Prompt
  3. Installing Pending Windows Updates
  4. Use the Windows 10 Version of Deployment Image Service and Management (if applicable)
  5. Perform A Repair Install
  6. Reinstall Windows
  7. Run System File Checker
  8. Run Windows Update Troubleshooter
  9. Running the CHKDSK Tool
  10. Repairing Windows
  11. Scan Windows PC with Microsoft Security Essentials
  12. 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.

  1. Open the search panel of your windows.
  2. Search Command Prompt.
  3. Now, from the menu given for the Command Prompt, select to Run as Administrator.

 

Running Command Prompt with Administrative Privileges

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.

  1. To check if your windows are updated, follow the instructions beneath.
  2. Open the Windows Settings.
  3. Locate the Windows update option.
  4. Click over a check for updates. 
Checking 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:

  1. Open the Local Group Policy Editor by typing gpedit.msc into the start menu search bar and press Enter.
  2. 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.
  3. 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.
See also  12 Best Fixes For Error Code 0x80070490 Issue

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:

  1. Download the Media Creation Tool from the Official Windows Microsoft page.
  2. Click the download button under the Create Windows Installation Media. 
  3. Launch the Media Creation Tool, approve all the terms and select Create Installation Media. 
Downloading windows media creation tool
  1. Select the options according to your device.
  2. Select the ISO file when asked to choose the output format.
Selecting ISO file format in media creation tool
  1. 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:

  1. Locate the ISO file. 
  2. Right-click on it and select the Mount option.
  3. Double click the set-up.exe file from the ISO mounted folder.
  4. Now, go to the Windows Settings.
  5. Open the Update and Security options and select the Recovery option.
  6. 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:

  1. Open the Windows Settings.
  2. Go to the Update and Security option and select recovery. 
  3. 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:

  1. Open the Command Prompt with the administrative privileges.
  2. Now, type in sfc /scannow and hit enter.
Running SFC scan software

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:

  1. Open the Run utility.
  2. Now, in the input window. Enter msconfig and hit enter.
  3. Go to the Boot tab and select Safe boot.
Running windows in the safe boot option

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:

  1. Open the Windows Settings.
  2. Go to the Update and Security.
  3. 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.

  1. To run CHKDSK, follow the instructions below:
  2. Go to Start.
  3. Select My Computer.
  4. Now right-click the drive and open properties.
  5. Go to the Tools tab.
  6. Now, check the error checking. 
  7. And off both the options in the pop-up check disk window.
  8. Now, just start the process by clicking the start button.
See also  7 Fixes For Mouse Double Clicks On A Single Click Issue

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:

  1. Enter the windows recovery environment.
  2. Look for the Troubleshoot option. 
Choose troubleshoot in windows recovery environment
  1. And click enter.
  2. Now select Advanced options.
  3. 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 the 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:

  1. Click the Start Button.
  2. Now, go to All the Programs.
  3. Open the Home tab.
  4. Select the preferred scan.
  5. 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:

  1. Insert the installation disc, and then boot your computer from it.
  2. 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.
  3. Type “Diskpart” and press Enter.
  4. At Diskpart, you need to run a few lines of commands to create a new partition:
  5. List disk
  6. Select disk [disk number]
  7. Create partition primary [size=n]
  8. 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 the 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. 

Frequently Asked Questions:

What Is DISM Error 87?

DISM error code 87 is the forthright result of the failure of the DISM clean-up command caused due to either faulty fatal command or system failure. It can also be caused due to the incompatible DISM image.

What Does DISM Online Cleanup-Image Restore Health Do?

The /Online command orders DISM.exe to target the running Operating System, and the /Cleanup-Image command completes clean-up and recovery operations over it. Finally, the /Restorehealth switch scans the Operating System for corrupt files and attempts to fix them.

What Can I Do To Prevent This In The Future?

You can easily prevent this by running the command with administrative privileges and keeping your windows updated.

What May Cause The DISM Error 87 Or Other DISM Mistake Codes?

In most cases, the error is caused due to misspelled commands or varying spreads.