DISM stops with “Error: 87” and a message like “The cleanup-image option is unknown,” usually right when you’re hoping it’ll repair Windows. In most cases you can fix it by retyping DISM.exe /Online /Cleanup-Image /RestoreHealth in an elevated Command Prompt, with a space before every slash, and then running sfc /scannow.
- Install any pending Windows updates and restart.
- Open Command Prompt with Run as administrator.
- Type
DISM.exe /Online /Cleanup-Image /RestoreHealthby hand and press Enter. - When DISM finishes without an error, type
sfc /scannowand press Enter. - Restart and test.
This is the same sequence Microsoft gives in its System File Checker guidance: update and restart, run DISM, then run SFC. If error 87 comes back, work through the fixes below.
What Is DISM Error 87?
Error 87 means DISM couldn’t recognize or use an option in your command. The wording after “Error: 87” changes with the command and where you run it. “The cleanup-image option is unknown” is the version you’ll see most often, but you may see a different option named.
DISM (Deployment Image Servicing and Management) is Microsoft’s command-line tool for servicing Windows images. That includes your running Windows installation, offline .wim images, and virtual hard disks. The executable lives at C:\Windows\System32\Dism.exe, and you can run it from any folder in Command Prompt.
Error 87 points to a problem with the command, the DISM version, or the environment you ran it in. It doesn’t tell you your Windows image files are damaged. DISM has other error codes for actual corruption.
What Causes DISM Error 87?
Error 87 in DISM usually comes from one of these:
- A typo or missing space.
/Online/Cleanup-Imagewith no space between the switches is the classic one. - Copy-paste damage. Web pages often turn the hyphen in
Cleanup-Imageinto an en dash or em dash. They can also add non-breaking spaces or paste prompt text likeC:\Windows\System32>. - No administrator rights. DISM needs an elevated prompt to service the running system.
- The wrong target. If you use
/Onlinefrom the Windows Recovery Environment (WinRE) or installation media, DISM targets the recovery environment instead of your installed copy of Windows. - An older DISM than the image. Microsoft states that DISM can service older Windows versions but can’t service a version newer than itself. Old boot media or an old deployment PC can cause this.
- Damaged servicing components, a pending update, or a broken Windows Update connection.
- A mismatched
/Source. This happens when you point DISM at a repair image that doesn’t match your edition or build.
The DISM /Online /Cleanup-Image /RestoreHealth command is valid on supported Windows 10 and Windows 11 installs. When it throws error 87, the command itself is fine. It’s exposing one of the problems above.
How to Fix DISM Error 87 on Windows 10 and Windows 11
Start at Fix #1 and work down. The early fixes take a minute each. The last one reinstalls Windows.
Fix #1: Check that you typed the command correctly
A single misplaced space or a fancy dash is enough to break DISM. Microsoft’s repair commands look exactly like this:
DISM.exe /Online /Cleanup-Image /CheckHealth
DISM.exe /Online /Cleanup-Image /ScanHealth
DISM.exe /Online /Cleanup-Image /RestoreHealth
Here’s what each one does:
/CheckHealthchecks whether Windows has already flagged the component store as corrupted. It’s quick./ScanHealthruns a deeper scan and takes longer./RestoreHealthscans and repairs, using your configured repair source (usually Windows Update, unless policy or a/Sourceoption points it elsewhere).
You don’t need all three. For a normal repair, go straight to /RestoreHealth.
- Clear the line in Command Prompt and retype the command by hand. Don’t paste it.
- Check that there’s a space before every
/. - Check that
Cleanup-Imageuses a normal hyphen from your keyboard. - Make sure there are no quotation marks around the command.
- Press Enter.
DISM.exe and dism work the same way, and capitalization doesn’t matter. Spacing and dashes do. If the retyped command runs and you see a progress bar climbing toward 100%, you’re past error 87.
Fix #2: Run Command Prompt as administrator
DISM needs administrator privileges to service the running copy of Windows. To launch Command Prompt elevated:
- Type
cmdin Windows Search, then select Run as administrator on the right.
- Select Yes in the User Account Control window.
- Check the title bar. It should start with Administrator: Command Prompt.
If the title bar just says Command Prompt, you’re not elevated, and DISM will fail. On Windows 11, you can also right-click Start and choose Terminal (Admin). If the window opens in PowerShell, the DISM commands work there too.
Fix #3: Update Windows
Microsoft lists updating and restarting as the first step before any DISM repair. A pending update can leave servicing files half-replaced, and an outdated Windows version can trip up DISM.
- Press
Windows + Ito open Settings. - On Windows 11, select Windows Update in the left pane. On Windows 10, go to Update & Security > Windows Update.
- Select Check for updates, then download and install anything that’s offered.
- Restart when Windows asks you to, even if it’s only one small update.
- Run the DISM command again.
On Windows 10, most editions reached end of support on October 14, 2025. If you’re not enrolled in Extended Security Updates, don’t expect new fixes to arrive through Windows Update. If Windows Update itself is broken, skip ahead to the repair-source and in-place repair options in the “When the standard steps fail” section. Retrying DISM over and over won’t help.
Fix #4: Check the Windows Modules Installer service
Windows Modules Installer (service name TrustedInstaller) installs, modifies, and removes Windows updates and optional components. DISM servicing operations use it, but a stopped service rarely causes a pure error 87 once your syntax is right. It’s still worth checking if DISM also complains about access or servicing.
- Type
Servicesin Windows Search and open it.
- Find Windows Modules Installer in the list and double-click it.
- Look at Startup type and Service status.
- If the status is Stopped, select Start.
- Select OK, then run DISM again.
I’d leave the startup type at Manual unless you have a reason to change it. That’s the normal setting on many PCs, and Windows starts the service on its own when it needs it. Forcing Automatic changes how Windows handles servicing and won’t fix error 87. The service can also stop again after a while when it’s idle, and that’s normal.
You can check and start the service from an elevated prompt instead:
sc.exe query TrustedInstaller
net start TrustedInstaller
Fix #5: Run the System File Checker (SFC) scan
SFC repairs protected system files. DISM repairs the component store that SFC copies its good files from. That’s why Microsoft’s order is DISM first, then SFC. If you run SFC on top of a broken store, it can’t fix much.
- Open Command Prompt as administrator, as shown in Fix #2.
- Type
sfc /scannowand press Enter.
- Let the scan reach 100%. It can sit on one percentage for a while, so don’t close the window.
- Restart your PC and run DISM again.
Here’s what SFC’s result means:
| SFC message | What to do |
|---|---|
| “Windows Resource Protection did not find any integrity violations.” | No protected-file damage. Your problem is the DISM command or environment. |
| “Windows Resource Protection found corrupt files and successfully repaired them.” | Restart and retest DISM. |
| “Windows Resource Protection found corrupt files but was unable to fix some of them.” | Check the CBS log at C:\Windows\Logs\CBS\CBS.log, then repair with a matching source (see below). |
| “Windows Resource Protection could not perform the requested operation.” | Try again in Safe Mode or from WinRE using offline syntax. |
Fix #6: Install the Windows Assessment and Deployment Kit (Windows ADK)
Skip this one if you’re repairing the copy of Windows you’re logged into right now. That copy already comes with the DISM built for it, and ADK won’t fix a typo or a missing elevation.
ADK is useful in one situation: you’re servicing a Windows image that’s newer than the DISM you’re running. For example, you might be servicing a Windows 11 24H2 or later image from an older deployment PC or old Windows PE media. According to Microsoft’s ADK install page, the September 2026 ADK release, together with its current servicing patch and the Windows PE add-on, supports Windows 11 26H2, 25H2, and 24H2, plus supported earlier Windows 10 and 11 releases.
- Download Windows ADK from the official source.
- Double-click the downloaded
.exefile to run it. - Choose the install path and select Next.
- On the features screen, select Deployment Tools. Leave out anything you won’t use.
- If you need Windows PE boot media, install the separate Windows PE add-on afterward.
- Run the ADK’s DISM from the Deployment and Imaging Tools Environment shortcut. Don’t run the copy in System32.
Don’t copy the ADK’s Dism.exe over the one in C:\Windows\System32. That swaps out a system file and creates a new problem.
Fix #7: Reinstall Windows
If you’ve confirmed the syntax, elevation, environment, and DISM version, and error 87 still won’t go away, reinstalling Windows is the last step. Back up your files first, either to an external hard drive or to cloud storage. If your drive uses BitLocker, write down your recovery key too.
- Press
Windows + Ito open Settings. - On Windows 11, go to System > Recovery and select Reset PC next to Reset this PC. On Windows 10, go to Update & Security > Recovery and select Get started under Reset this PC.
- Choose Keep my files or Remove everything.
- If Windows asks, choose Cloud download (fresh files from Microsoft) or Local reinstall (files already on your PC). Cloud download is the safer pick when local files might be damaged.
- Follow the prompts to finish the reset.
Keep my files keeps your personal files but removes your installed apps and resets most settings. It doesn’t back anything up. Remove everything wipes files, apps, and settings. The exact labels can vary a little by build and by PC manufacturer. Reset this PC also isn’t the same as an OEM factory-recovery image, which restores the manufacturer’s software and partitions.
If Windows still boots, try an in-place repair install before you reset. It keeps your apps:
- Download Windows installation media that matches your installed language, edition, and architecture (64-bit or ARM64).
- Open the ISO or plug in the USB flash drive while Windows is running, then run
setup.exe. - When Setup offers it, choose to keep personal files and apps.
Don’t boot from the USB for this. Booting from media takes you to a clean-install workflow.
You can also clean install Windows 10 or 11 from an ISO. It takes longer, and you’ll need a bootable USB drive. A clean install removes apps, settings, and usually all the data on the partitions you select, so check that your backup actually opens before you start.
When the Standard Steps Fail
If you’re still stuck after the fixes above, the cause is usually your environment, a broken repair source, or a lock on the PC itself.
You’re running DISM from WinRE or installation media
This is the big one if your PC won’t boot. If your prompt shows X:\Windows\System32, you’re in the recovery environment. In WinRE, /Online points DISM at the recovery environment itself rather than your installed copy of Windows, which commonly ends in error 87 or another servicing error. Use /Image: with your Windows drive letter instead.

- Type
diskpartand press Enter. - Type
list volumeand press Enter. Look for your Windows partition by size and label. It’s often notC:here. - Type
exitto leave diskpart. - Type
dir D:\(swap in the letter you found) and confirm you seeWindows,Program Files, andUsers. - Run the offline versions of both commands, replacing
D:with your drive:
DISM.exe /Image:D:\ /Cleanup-Image /RestoreHealth
sfc /scannow /offbootdir=D:\ /offwindir=D:\Windows
Windows Update can’t supply repair files
/RestoreHealth downloads replacement files from Windows Update. If that connection is blocked or broken, point DISM at a mounted ISO that matches your edition, language, architecture, and build. First, find the right index for your edition (here, E: is the mounted ISO):
DISM.exe /Get-WimInfo /WimFile:E:\sources\install.wim
Then run the repair with that index (6 here is only an example):
DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:wim:E:\sources\install.wim:6 /LimitAccess
If your media has install.esd instead of install.wim, use esd: in place of wim: and change the file name. A wrong index or a mismatched ISO gives you a different error, so double-check the edition name before you run it.
“Run as administrator” is missing or UAC won’t prompt
If you get a password box instead of a Yes button, or no option at all, you’re signed in with a standard account. On a work or school PC, your organization may also block elevation. Ask whoever owns the admin account to enter their credentials. Don’t turn off UAC or edit security policy just to run DISM.
The Start button is greyed out in Services
If Start is greyed out for Windows Modules Installer, Group Policy or management software may control the service, or your account may lack permission. The service itself may also be damaged. On a managed PC, this is a ticket for IT. On a home PC, signing in with an administrator account usually fixes it. If it doesn’t, the in-place repair install from Fix #7 is your best next step.
Managed devices lock the repair path
Organizations can restrict Windows Update, USB drives, network repair sources, and Reset this PC. If the reset or recovery options are missing or greyed out on a work laptop, that’s policy. Ask your admin to run the repair or provide an approved source.
Low disk space, disk errors, or BitLocker
DISM needs free space to stage repairs. If you’re nearly full, clear space first or move files to an external SSD. Don’t interrupt DISM once it starts, even if it sits at one percentage for a long time. If the drive itself is failing, repairs won’t stick. If BitLocker is on, confirm you can get your recovery key before you touch WinRE or a reset.
Conclusion
Start with Fix #1, since syntax is the most common cause of error 87: retype the command in an elevated prompt with a space before every slash, then run SFC. If you’re working from WinRE or old boot media, switch to the /Image: syntax or a newer DISM before you consider reinstalling. If SFC keeps finding files it can’t fix after a successful DISM run, or repairs stop sticking after every restart, check the drive’s health before you reset Windows.