Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

If running the DISM command returns error 87, you’re probably misusing the command. Try my 3 fixes in this guide to run DISM successfully.

Option 1: Format the DISM Command Corectly

The first thing to check is that there are no spaces with your command. Also, ensure that you use “/” before any DISM switch. Finally, do not leave a space between “/” and a DISM switch.

To run any of the command discussed in this guide, open command prompt as administrator.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Search command prompt, right-click it then select Run as administrator.

Popular on Amazon
Atelse 8-in-1 MacOS, Bootable Big Sur、Catalina、Mojave、High Sierra、El Capitan、Yosemite、Mavericks、Mountain Lion, USB Drive 3.2, Full Install/Upgrade/Downgrade
  • ✅8-IN-1 USB drive 3.2: Big Sur 11.7、Catalina 11.15.7、Mojave 11.14.6、High Sierra 11.13.6、El Capitan 10.11.6、Yosemite 10.10.5、Mavericks 10.9.5、Mountain-Lion 10.8.5, Can be fully installed on your Mac
  • ✅1. Plug-In USB Drive
  • ✅2. Holding the "Option" key , and Power On
  • ✅3. it will appear startup menu, choose USB drive from startup menu
  • ✅4. After that, the installation will begin.

Lets see how each of the situations described throws DISM error 87 in Windows Server 2016.

Type the command below in command prompt then press enter.

DISM /Online/Cleanup-Image /RestoreHealth

Here is the result. Error: 87 “The online/cleanup-image option is unknown.”

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
dism error 87 server 2016

Now, I will run the command with a space.

DISM /Online /Cleanup-Image /RestoreHealth

Command is running successfully!

Another command mistake that causes error 87 is to exclude the “/” before a DISM switch.

Also popular on Amazon
CORRSQ 30-in-1 Bootable USB Drive
  • 1. COMPATIBLE WITH WINDOWS 11, 10, 8.1 & 7 Designed for compatible 64-bit PCs and laptops that support USB booting. Works with Windows 11, Windows 10, Windows 8.1 and Windows 7 installation and recovery options.
  • 2. INSTALL, REINSTALL & REPAIR Provides access to installation and recovery options for startup failures, boot errors, system crashes, failed updates, system repair and reinstallation. Results depend on the condition of the computer and the cause of the problem.
  • 3. READY-TO-USE BOOTABLE USB Reusable installation and recovery media that helps eliminate the need to download large system files or create bootable media yourself. Insert the USB drive, open the computer’s boot menu and select the appropriate installation or recovery option.
  • 4. HELP KEEP OLDER PCS USEFUL Refresh, reinstall or maintain a compatible older computer before deciding whether replacement is necessary. Suitable for home computers, office workstations, PC enthusiasts and technicians who regularly work with supported systems.
  • 5. IMPORTANT COMPATIBILITY & LICENSE INFORMATION Supports compatible 64-bit computers with UEFI or Legacy BIOS USB booting. No Windows license, activation key or product key is included. Activation may require an existing digital license or a separately purchased valid product key. Back up important files before installation or repair.

To see how this could cause the error message, type this command and press enter:

DISM /Online Cleanup-Image /RestoreHealth

Here is DISM error 87 in Windows Server 2016 again!

Solution? Add a “/” before Cleanup-Image. Here is the amended command:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
DISM /Online /Cleanup-Image /RestoreHealth

Option 2: Use Valid DISM command Line Arguments

Another command mistake that leads to DISM error 87 is to run the command shown below:

Also popular on Amazon
Atelse 4-in-1,Bootable MacOS Tahoe 26、MacOS Sequoia 15、Sonoma 14、High Sierra 10.13.6, USB Drive 3.2, Reinstall/Recovery/Restore Mac OS X
  • ✅For Tahoe, use disk utility to erase hard drive in "APFS", not "mac os extended"
  • ✅4-IN-1 USB drive 3.2: Tahoe 26、Sequoia 15、Sonoma 14、High Sierra 10.13.6, Can be fully installed on your Mac
  • ✅Support Type-C and USB Port, Included instruction and technical support
  • ✅1. Connect USB Drive and Power off Mac
  • ✅2. Holding the "Power Button" for 12 seconds. ( High Sierra Holding Option key, not power button )
DISM /Online /Cleanup-Image

Here is the DISM error message:

Error 87: “An error occurred while processing the command. Ensure that the command-line arguments are valid”

dism error 87 server 2016

The fix? Use the complete command parameters as show below:

DISM /Online /Cleanup-Image /RestoreHealth
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Option 3: Use the /Image switch Corectly

Another cause of DISM error 87 is to use /Image switch from within Windows.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Here is a sample command:

 DISM /Image:c:\ /Cleanup-Image /RestoreHealth

The command returned error: 87:

“The /Image option that is specified points to a running Windows installation. To service the running operating system, use the /Online option.”

Also popular on Amazon
Beamo Ubuntu 26.04 LTS Bootable USB 16GB — Install or Run Live on Your PC | Ubuntu 26.04 LTS (Resolute Raccoon) — the long-term support release, with security updates until May 2031
  • UBUNTU 24.04.3 LTS MEDIA - 16GB bootable USB with Ubuntu Desktop 24.04.3 LTS for compatible x86-64 PCs.
  • LIVE OR INSTALL - On supported hardware, start the Ubuntu live environment to evaluate it or launch the installer.
  • PLATFORM BOUNDARY - Not designed to boot Apple Silicon or other ARM-based computers. Confirm CPU architecture and USB-boot support before purchase.
  • BOOT SETTINGS VARY - Boot-menu keys and UEFI settings differ by manufacturer; consult the computer maker's instructions if the USB is not listed.
  • BACK UP BEFORE INSTALLING - Disk-partition and installation choices can erase files or operating systems. Disconnect nonessential drives and preserve the USB until it is no longer needed for installation or recovery.

The fix? Modify the command as shown below:

 DISM /Online /Cleanup-Image /RestoreHealth
To see how you can run DISM /Image:c:\ /Cleanup-Image /RestoreHealth command read How to Fix DISM Error 50 in Windows 10 and Windows Server 2016.

Option 3: Run SFC /Scannow Before DISM

If none of the above is the reason for DISM error 87 in Windows Server 2016, try the following:

  • Type this command and press enter
SFC /Scannow

Wait for the command to complete. If it returns errors, restart your server then run your DISM command.

Conclusion

One of the fixes discussed in this guide should resolve DISM error 87.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

I hope you found this Itechguide helpful. If it was helpful please spare a few minutes to share your thoughts by responding to the “Was this page helpful?” question below.

Want more Widows Server fixes? Visit our Windows Server Fix page.

Quick Recap

Bestseller No. 1
Atelse 8-in-1 MacOS, Bootable Big Sur、Catalina、Mojave、High Sierra、El Capitan、Yosemite、Mavericks、Mountain Lion, USB Drive 3.2, Full Install/Upgrade/Downgrade
Atelse 8-in-1 MacOS, Bootable Big Sur、Catalina、Mojave、High Sierra、El Capitan、Yosemite、Mavericks、Mountain Lion, USB Drive 3.2, Full Install/Upgrade/Downgrade
✅1. Plug-In USB Drive; ✅2. Holding the "Option" key , and Power On; ✅3. it will appear startup menu, choose USB drive from startup menu
$23.99
Bestseller No. 2
Bestseller No. 3
Atelse 4-in-1,Bootable MacOS Tahoe 26、MacOS Sequoia 15、Sonoma 14、High Sierra 10.13.6, USB Drive 3.2, Reinstall/Recovery/Restore Mac OS X
Atelse 4-in-1,Bootable MacOS Tahoe 26、MacOS Sequoia 15、Sonoma 14、High Sierra 10.13.6, USB Drive 3.2, Reinstall/Recovery/Restore Mac OS X
✅For Tahoe, use disk utility to erase hard drive in "APFS", not "mac os extended"; ✅Support Type-C and USB Port, Included instruction and technical support
$22.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.