The Deployment Image Servicing and Management (DISM) tool is essential for repairing and servicing Windows images. However, encountering the "DISM Error 87" on Windows 11 can be frustrating. This error is commonly due to incorrect command usage or insufficient privileges. This guide provides several methods to resolve the DISM Error 87 on your Windows 11 PC.

Probable causes of the DISM Error 87

Before attempting to fix the DISM Error 87, it's important to understand what might be causing it. This error often arises due to user mistakes or system inconsistencies. Knowing the potential causes can help prevent future occurrences.

  • Incorrect command syntax: One of the primary reasons for this error is entering the DISM command incorrectly. Even a minor typo or misplaced space can cause the command to fail. Ensure that the command is typed accurately, paying attention to spelling, spaces, and symbols.
  • Lack of administrative privileges: Running DISM without administrative rights can lead to Error 87. Since DISM modifies system files, it requires elevated permissions to operate. Always run the Command Prompt or Terminal as an administrator when executing DISM commands.
  • Corrupted Windows installation: An improper or corrupted installation of Windows 11 may cause the error to appear. System file corruption can interfere with DISM operations.
  • Version incompatibility: The error might occur if you're attempting to service an operating system with a DISM version that doesn't support it. For example, DISM version 1511 can service OS versions 1511 and 1507 but not 1607. Check the official list of supported DISM versions to ensure compatibility.

Method 1: Open the command prompt with administrative privileges

Running the DISM tool without administrative rights is a common cause of Error 87. Ensuring that you're executing commands with the necessary permissions can quickly resolve the issue.

Step 1: Open the Start Menu and type Terminal in the search bar. Right-click on the Terminal app in the search results and select Run as administrator from the context menu.

Step 2: When prompted by the User Account Control (UAC), click Yes to grant administrative access.

Step 3: In the Windows Terminal window, click the downward arrow icon next to the '+' tab and select Command Prompt from the dropdown menu. Alternatively, you can press Ctrl + Shift + 2 on your keyboard to open Command Prompt in a new tab.

Step 4: With Command Prompt running as administrator, execute your DISM commands as required.


Method 2: Ensure the DISM command is correct

Entering the DISM command incorrectly is a common cause of Error 87. Even a small typo can prevent the command from executing properly.

Step 1: Double-check the syntax of your DISM command. Pay close attention to spaces, slashes, and hyphens. The command should match the appropriate syntax for the operation you intend to perform.

Step 2: For example, to restore the health of your system image, use the following command:

DISM /Online /Cleanup-Image /RestoreHealth

Ensure that there is a space before each parameter and that the slashes and hyphens are correctly placed.

Step 3: Avoid copying commands from unreliable sources, as they may contain errors. If you're copying and pasting, paste the command into a text editor first to verify its correctness before executing it in Command Prompt.


Method 3: Boot into safe mode and run DISM

If the error persists, booting your PC in Safe Mode can help eliminate interference from third-party applications or services.

Step 1: Start your PC in Safe Mode

Step 1: Click on the Start Menu and select the Settings icon from the pinned apps. Alternatively, press Windows + I to open the Settings app.

Step 2: In the Settings window, ensure you're on the System tab. Scroll down and click on Recovery.

Step 3: Under the Recovery options section, locate Advanced startup and click on Restart now. This will reboot your PC.

Step 4: After restarting, you'll see the Choose an option screen. Click on Troubleshoot.

Step 5: In the Troubleshoot menu, select Advanced options.

Step 6: Click on Startup Settings.

Step 7: Click on Restart to access the Startup Settings menu.

Step 8: After your PC restarts, you'll see a list of startup options. Press 5 or F5 on your keyboard to select Enable Safe Mode with Networking.

Loading Safe Mode with Networking ensures you have internet access, which is necessary for the next steps.

Step 2: Run DISM and SFC Commands

Step 1: Once in Safe Mode, right-click on the Start Menu and select Windows Terminal (Admin).

Step 2: If prompted by the User Account Control, click Yes to proceed.

Step 3: In Windows Terminal, click the downward arrow icon and select Command Prompt to open it in a new tab. Alternatively, press Ctrl + Shift + 2 on your keyboard.

Step 4: Type the following command and press Enter to restore the system image:

DISM /Online /Cleanup-Image /RestoreHealth

Note: An internet connection is required for this command, as it downloads necessary files from Microsoft servers.

Step 5: Wait patiently as the DISM command runs. It may take several minutes and might appear to stall at times, but this is normal.

Step 6: After the DISM command completes, type the following command and press Enter to run the System File Checker:

SFC /scannow

Step 7: Once the SFC scan is complete, restart your computer to exit Safe Mode. The DISM Error 87 should now be resolved.


Method 4: Run CHKDSK

The CHKDSK utility checks the integrity of your hard drive and can fix various file system errors that might cause DISM Error 87.

Option 1: Run CHKDSK Using File Explorer

Step 1: Open File Explorer by clicking on the folder icon in the taskbar or pressing Windows + E.

Step 2: In the left pane, click on This PC. Then, right-click on the drive you want to check (usually the C: drive) and select Properties from the context menu.

Step 3: In the Properties window, click on the Tools tab. Under the Error checking section, click on Check.

Step 4: If Windows reports that no errors were found, you can still choose to scan the drive. Click on Scan drive to proceed.

Step 5: Wait for the scan to complete. This may take some time depending on your drive's size and speed.

Option 2: Run CHKDSK Using Command Prompt

For more control and flexibility, you can run CHKDSK via Command Prompt with specific parameters.

Step 1: Open Windows Terminal as an administrator. Search for Terminal in the Start Menu, right-click on Windows Terminal, and select Run as administrator.

Step 2: Click the downward arrow icon and select Command Prompt to open it in a new tab.

Step 3: In the Command Prompt window, type the following command and press Enter:

chkdsk /f

Step 4: You might receive a message stating that the drive is in use and asking if you want to schedule the scan on the next restart. Press Y and press Enter to schedule the scan.

Step 5: Restart your computer. The CHKDSK utility will run before Windows boots, scanning your drive and fixing any detected errors.


Method 5: Factory reset Windows 11

If all else fails, performing a factory reset might resolve the DISM Error 87. Be aware that this will remove all your files, applications, and settings. It's recommended to back up important data before proceeding.

Step 1: Open the Start Menu and click on the Settings icon. Alternatively, press Windows + I to open Settings.

Step 2: In the Settings window, select the System tab. Scroll down and click on Recovery.

Step 3: Under Recovery options, click on Reset PC next to Reset this PC.

Step 4: Choose whether to Keep my files or Remove everything. Selecting Remove everything is recommended for a complete reset.

Step 5: Select the method for reinstalling Windows. Choose between Cloud download or Local reinstall. Cloud download is more reliable, but requires an internet connection and will download about 4 GB of data.

Note: Neither option requires external installation media.

Step 6: Review the current reset settings. If you want to change any settings, click on Change settings.

Step 7: Adjust additional settings as needed:

  • Clean data? Toggle to Yes to securely erase files, which is recommended if you're giving away your PC.
  • Delete files from all drives? Toggle to Yes to remove files from all drives, not just the drive where Windows is installed.
  • Download Windows? Switch between Cloud download and Local reinstall if needed.

Step 8: After configuring settings, click on Confirm, then click Next.

Step 9: Windows will display a summary of the reset operation. Read the information and click Reset to begin the process.

Step 10: Your PC will restart several times during the reset process. This may take several hours to complete. Once finished, Windows will be reinstalled, and the DISM Error 87 should be resolved.


By following these methods, you should be able to fix the DISM Error 87 on your Windows 11 PC and ensure that the DISM tool functions correctly.