Skip to content
Windows 11 Field Guide
Menu

Troubleshooting

DISM RestoreHealth Windows 11: Commands, Order and Fixes

Written by Windows 11 Field Guide Editorial Team · Updated

A DISM RestoreHealth Windows 11 repair fixes the component store, the internal library of Windows components that the system uses to install updates and to fix damaged files. When that store is corrupted, updates fail and System File Checker cannot do its job. DISM (Deployment Image Servicing and Management) is built into Windows, runs from a command prompt, and does not touch your files or apps. This guide explains the three health commands, the order to run them, and how to repair from a Windows 11 ISO when the normal method fails.

When to use DISM

Reach for DISM when:

  • Windows updates fail repeatedly or roll back.
  • sfc /scannow reports that it found corrupt files but could not fix some of them.
  • Windows features or built-in apps behave strangely after a crash or power loss.

Microsoft’s guidance for repairing system files is to run DISM first and SFC second. DISM fixes the store; SFC then uses the store to fix individual files. Our sfc /scannow guide covers that second half.

Open an administrator command prompt

  1. Right-click Start and select Terminal (Admin), or search for cmd, right-click Command Prompt and choose Run as administrator.
  2. Approve the User Account Control prompt.

All commands below need this elevated window. Each has a space before every slash.

CheckHealth, ScanHealth and RestoreHealth compared

DISM has three health options under /Cleanup-Image:

CommandWhat it doesTimeChanges anything?
Dism /Online /Cleanup-Image /CheckHealthChecks whether the image has already been flagged as corrupted and whether it can be repairedSecondsNo
Dism /Online /Cleanup-Image /ScanHealthScans the component store for corruptionSeveral minutesNo
Dism /Online /Cleanup-Image /RestoreHealthScans for corruption and repairs it automaticallySeveral minutes or moreYes

CheckHealth reports one of three states: healthy, repairable or non-repairable. If you just want to fix things, you can skip straight to RestoreHealth, because it includes the scan. CheckHealth and ScanHealth are useful when you want to know whether there is a problem before making changes.

Run RestoreHealth

In the administrator window, run:

DISM /Online /Cleanup-Image /RestoreHealth

What to expect:

  • A progress bar that may sit at one percentage for a long time. That is normal; give it time.
  • By default, DISM fetches replacement files from Windows Update, so keep the PC online.
  • When it finishes, you should see “The restore operation completed successfully” or “The operation completed successfully”.

Then run sfc /scannow in the same window, and restart.

If DISM says the source files could not be found

The usual failure is an error saying the source files could not be found, often shown with error 0x800f081f. This means DISM could not get clean copies of the damaged components, commonly because Windows Update itself is broken or blocked.

You have two options:

  1. Fix Windows Update first. Work through our Windows 11 update stuck guide, then retry DISM.
  2. Give DISM a local source, such as a mounted Windows 11 ISO. This is covered next.

Repair from a mounted Windows 11 ISO with /Source

Microsoft documents using /Source with /RestoreHealth to point DISM at known-good files, and /LimitAccess to stop it from contacting Windows Update. A Windows image file (.wim) can be used as a source if you add the WIM: prefix and the image index.

  1. Get a matching ISO. Download the Windows 11 ISO from Microsoft; see our Windows 11 ISO download guide. It should match your installed language and be as close as possible to your version. Microsoft warns that if the PC is patched to a higher level than the source, the repair may fail.

  2. Mount it. Right-click the ISO in File Explorer and select Mount. Note the drive letter it gets, for example D:.

  3. Check the file. Open D:\sources and look for install.wim. Some media contain install.esd instead; the steps below use the .wim form that Microsoft documents.

  4. Find the right index. The .wim file holds several editions. List them:

    Dism /Get-ImageInfo /ImageFile:D:\sources\install.wim

    Note the index number for your edition, for example Windows 11 Home or Windows 11 Pro. You can check your edition in Settings > System > About.

  5. Run RestoreHealth with the source, replacing 6 with your index:

    DISM /Online /Cleanup-Image /RestoreHealth /Source:WIM:D:\sources\install.wim:6 /LimitAccess
  6. When it completes, run sfc /scannow, then eject the ISO from File Explorer.

If you specify more than one /Source, DISM uses the first location where it finds the files.

While you are in the component store, two other /Cleanup-Image options are worth knowing:

  • Dism /Online /Cleanup-Image /AnalyzeComponentStore creates a report on the size of the component store and whether a cleanup is recommended. It changes nothing.
  • Dism /Online /Cleanup-Image /StartComponentCleanup removes superseded components to reduce the store’s size. Windows also does this on a schedule.

Be careful with /StartComponentCleanup /ResetBase. Microsoft documents that installed Windows updates cannot be uninstalled after running it, which takes away one of your easiest fixes if a future update causes trouble. It is not needed for repairs.

When DISM cannot fix it

If DISM still fails, or SFC keeps finding problems after a successful DISM run, repair Windows as a whole:

  • Fix problems using Windows Update: Settings > System > Recovery > Reinstall now. This reinstalls the current version and keeps apps, files and settings.
  • Reset this PC, the last resort, explained in our Reset this PC guide.

See the full order of repairs in our Windows 11 troubleshooting hub.

Frequently asked questions

What does DISM RestoreHealth actually repair?

It repairs the Windows component store, the cache of system components that Windows uses for updates and for SFC repairs. It does not touch your personal files or installed apps.

How long does DISM RestoreHealth take?

Typically several minutes, sometimes longer on slower drives or when it has to download many files. It often pauses at one percentage for a while, which is normal.

Do I need an ISO to run DISM RestoreHealth?

No. By default it uses Windows Update as the repair source. An ISO is only needed when Windows Update cannot provide the files, for example when Windows Update itself is broken.

Which ISO should I use as a DISM source?

Use a Windows 11 ISO that matches your installed version, edition and language as closely as possible. Microsoft notes that the source should be patched to at least the same level as the PC, or the repair may fail.

Sources

W1

Windows 11 Field Guide Editorial Team

Editorial team

The Windows 11 Field Guide team writes and updates independent Windows 11 guides and checks each step against Microsoft's documentation and the current Settings app.

Related guides