DISM Error in Windows 11: How to Fix Common Failures
A DISM error in Windows 11 usually means the repair command was typed wrong, wasn’t run with administrator rights, or couldn’t find the files it needed. The safest first fixes are to run Command Prompt or Terminal as administrator, check the exact command syntax, and reboot before trying anything deeper. If the message includes a code such as `87` or `0x800f081f`, that code usually tells you which path to take next.
What the DISM error is telling you
Error
The exact message varies.The message matters more than the word “failed.” DISM can stop for very different reasons, and the fix depends on which one you have.
If Windows says the command is invalid, the problem is usually syntax. If DISM says it cannot find source files, it usually means Windows Update or the local component store cannot supply what DISM needs. If it fails with an access or permission problem, you probably did not start the shell as administrator. If it reports that it cannot repair the image, the Windows component store may be damaged enough that it needs a local source or a follow-up repair.
Here are the clues to watch for:
Error: 87usually points to a command line mistake.0x800f081fusually means the source files are missing.- A permissions or access message usually means the shell was not elevated.
- Messages about corruption or unrepaired files usually mean the image needs deeper repair or a clean source.
If you only remember one thing, read the exact code and the line right above it. That is the part that tells you whether you are dealing with syntax, permissions, source files, or actual image corruption.
When this problem applies on Windows 11
This applies when you ran DISM on Windows 11 after system problems, update failures, weird app behavior, or an sfc /scannow result that said it could not fix everything. It also shows up after interrupted updates, power loss during maintenance, storage trouble, or long periods of system instability.
Before you change anything major, do these safe checks:
- Save your work and close open apps.
- Make sure you are on the Windows 11 installation you want to repair, not a different offline image by mistake.
- If the PC has been up for days or has gone through several failed repairs, restart it first.
- If you are using commands that can touch system files, open the shell with administrator rights.
You do not need to reinstall Windows just because DISM failed once. In many cases, the problem is the command itself, the source path, or a temporary Windows Update issue. The goal is to correct the repair path without making the machine less stable.
Start with the safest fixes
Start with the reversible things first. Most DISM failures are fixed by running the command in an elevated shell, making sure the syntax is right, and clearing out a stale state with a reboot.
- Open Command Prompt or Windows Terminal as administrator.
DISM /Online /Cleanup-Image /RestoreHealth- Type the command again carefully if you copied it from somewhere else. A missing slash, extra space, or wrong option can break it.
- Restart the PC if it has been running for a long time, or if the machine recently failed an update or repair.
Expected result: DISM should start checking the component store and, if Windows Update can supply what it needs, continue past the point where it failed before. If it now runs without the old error, the issue was likely permissions, a stale session, or a typo.
If the same failure returns, move to the specific code instead of repeating the same command over and over. Re-running a bad command does not fix a bad command, and repeated failed repairs can waste time when the real problem is simple.
Fix error 87 and other command syntax problems
Error: 87 almost always means DISM did not like the command you typed. This is the first thing to fix because it does not point to corrupted Windows files; it points to the command line itself.
Use a plain, known-good command in an elevated Command Prompt or Terminal:
DISM /Online /Cleanup-Image /RestoreHealthCommon mistakes include:
- Typing
-instead of/ - Leaving out
/Online - Misspelling
Cleanup-ImageorRestoreHealth - Adding extra arguments in the wrong order
- Copying a command with smart quotes or hidden characters
If you are working on an offline Windows image, the syntax changes, and a typo there can also produce error 87. But for a normal Windows 11 repair on the running system, the command above is the one to compare against.
Expected result: DISM accepts the command and begins processing. If you still get error 87 after retyping it exactly, check that you opened the correct shell and that no extra text was pasted before or after the command. A syntax error does not mean the system is badly damaged; it means the command line was not parsed the way DISM expected.
Fix source file errors like 0x800f081f
0x800f081f usually means DISM could not find the files it needs to complete the repair. On Windows 11, that often happens when Windows Update cannot provide the source, the local component store is incomplete, or the machine is offline.
The safest fix is to point DISM at a matching Windows 11 installation source, usually an ISO mounted in File Explorer. The source should match the installed edition and architecture as closely as possible.
- Mount the Windows 11 ISO or connect the installation media.
- Find the correct
install.wimorinstall.esdinside thesourcesfolder. - Use
DISM /Sourcewith/LimitAccessso DISM uses the local file instead of trying Windows Update again.
DISM /Online /Cleanup-Image /RestoreHealth /Source:wim:X:\sources\install.wim:1 /LimitAccessIf the image file is install.esd instead of install.wim, use that file name in the same spot.
What the command needs to point to:
- The mounted ISO drive letter or USB drive letter
- The exact file inside
sources - The correct image index, if needed
If DISM says the source is not valid, the ISO may not match your Windows 11 build or edition, or the index may be wrong. If you are unsure, a matching Microsoft ISO is the cleanest source to try. If Windows Update kept failing before, /LimitAccess helps stop DISM from going back to the same broken download path.
If you need the source to work, make sure the path is exact. A typical ISO-based command points to the mounted media with a drive letter such as X:, then the file under sources, then the image index. If you do not know the right index, the error will usually tell you the source is not valid, and that is your cue to check the ISO contents rather than changing other repair settings.
If DISM still fails, run SFC in the right order
DISM and SFC fix different parts of Windows, so the order matters when files are damaged. DISM repairs the component store that SFC depends on, while SFC repairs protected system files using that store as its reference.
If DISM failed because the image is damaged, run DISM first, then SFC. If you already ran SFC and it reported that it could not fix files, that is another sign you should return to DISM with a better source.
A common repair sequence is this:
DISM /Online /Cleanup-Image /RestoreHealthThen run:
sfc /scannowIf SFC finishes cleanly after DISM, that usually means the component store is healthy enough for Windows File Protection to do its job. If SFC still reports unrepairable files after a successful DISM run, the system may need a stronger source or there may be damage outside the normal component store path.
If you ran SFC first and nothing changed, that does not mean the machine is beyond repair. It usually means SFC did not have a healthy source to copy from yet.
How to check whether the repair worked
A repair counts as successful only if the command finishes without the old error and the follow-up check is clean. The exact wording in DISM output varies, but you want to see that the operation completed and that no unrepaired corruption remains.
After the repair, run the command again:
DISM /Online /Cleanup-Image /RestoreHealthExpected result: it should no longer stop at the same error code, and it should complete normally. Then run sfc /scannow and check whether it says Windows Resource Protection found no integrity violations or repaired what it could.
A good sign is this sequence:
- DISM completes without the previous code
- SFC finishes without reporting unfixable files
- Windows Update, startup, or the app problem that started this feels stable again after a restart
If the command succeeds but the PC still acts unstable, the issue may not have been system file corruption at all. In that case, the next clue is usually in Event Viewer, Windows Update history, or storage health.
When the error points to deeper Windows damage
Sometimes DISM is not the real problem; it is just the first tool to hit the damaged part of Windows. That is more likely when you keep getting the same failure after using the right syntax, administrator rights, a restart, SFC, and a matching source ISO.
At that point, look for signs of a deeper issue:
- Windows Update keeps failing across several attempts
- DISM works only with a local source, not the normal online repair path
sfc /scannowkeeps finding files it cannot fix- The machine shows broader instability, such as recurring crashes or disk-related errors
If you suspect deeper damage, check disk health and consider an in-place repair install before jumping to a clean install. An in-place repair keeps your files and apps while rebuilding Windows system files, which is often the next safe step when repair tools can no longer finish their job. A full reinstall is usually the last step, not the first one.
Conclusion
If DISM failed once, start again with the simple fixes: admin rights, correct syntax, a restart, then a matching ISO source if you hit `0x800f081f`. If the command now finishes and SFC runs cleanly, you are in good shape. If the same error keeps returning after those steps, check Windows Update, disk health, or an in-place repair install before you think about wiping the PC.
Frequently Asked Questions
Should I run DISM or SFC first on Windows 11?
If you suspect the Windows component store is damaged, run DISM first and then SFC. SFC depends on a healthy source, so DISM often needs to repair that first.
What does DISM error 87 mean?
It usually means the command syntax is wrong. Recheck the slashes, spelling, and order, and compare your command with `DISM /Online /Cleanup-Image /RestoreHealth`.
Why does DISM show 0x800f081f?
That code usually means DISM could not find the source files it needs. A matching Windows 11 ISO with `/Source` and `/LimitAccess` is the usual fix.