Windows Image Repair using dism /online /cleanup image /restorehealth (guide)

To repair a Windows image, open Command Prompt as administrator, run DISM.exe /Online /Cleanup-Image /RestoreHealth, wait for The restore operation completed successfully, then run sfc /scannow.

DISM rebuilds the component store that SFC copies good files from, which is why it runs first; the repair usually takes several minutes and needs an internet connection unless you point it at a Windows ISO.

This guide covers what the command repairs, the CheckHealth and ScanHealth checks, the PowerShell cmdlet, how long it takes, what to do when it looks stuck, repairing from a Windows ISO when Windows Update cannot help, reading the logs, the wider DISM cleanup commands, and what to do when the repair fails on Windows 11 and Windows 10.

Windows Image Repair using dism /online /cleanup image /restorehealth (guide)
The final line, The restore operation completed successfully, means the component store is fixed and sfc /scannow can run next. (Image: Microsoft Q&A)
Microsoft's Step 1: Run DISM instructions with dism /online /cleanup image /restorehealth before SFC
Microsoft's System File Checker article runs DISM first, then SFC. (Image: Microsoft Support)

DISM RestoreHealth command to repair a Windows image

This is Microsoft's own sequence for a PC that still starts. It needs an administrator account and, by default, an internet connection.

  1. Type cmd in the taskbar search box.
  2. Right-click Command Prompt and select Run as administrator, then select Yes at the prompt.
  3. Type DISM.exe /Online /Cleanup-Image /RestoreHealth and press Enter.
  4. Wait for The restore operation completed successfully. The scan takes several minutes.
  5. Type sfc /scannow and press Enter to repair the system files from the now-healthy image.
  6. Restart the PC when SFC reaches 100%.

What does DISM /Online /Cleanup-Image /RestoreHealth do?

DISM (Deployment Image Servicing and Management) services Windows images. /Online points it at the running copy of Windows, and /Cleanup-Image selects its cleanup and recovery operations.

RestoreHealth repairs the component store, the store of known-good files that SFC copies from. That is why a broken store makes SFC fail and why DISM runs first.

Part of Windows What DISM checks Where it lives
Servicing packages Package files and their metadata %SYSTEMROOT%\Servicing\Packages
Component manifests Manifests that describe every component %SYSTEMROOT%\WinSxS\Manifests
Component registry data Component and schema registration HKEY_LOCAL_MACHINE\Components and HKEY_LOCAL_MACHINE\Schema
Servicing registry data Component Based Servicing state HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing
Repair files Downloads good copies of damaged files Windows Update by default, or the folder or .wim file named in /Source

DISM.exe is built into every Windows 10 and Windows 11 installation in C:\Windows\System32, so you can run it from any folder in an elevated window; there is nothing to download.

When DISM finds an incorrect manifest, cabinet file or registry entry, it replaces it with a corrected version.

CheckHealth vs. ScanHealth vs. RestoreHealth

DISM has three health switches. They differ in speed and in whether they change anything, so match your situation to a row.

Your situation Run this Why
You want a quick yes/no before repairing DISM /Online /Cleanup-Image /CheckHealth Reports whether the image is already flagged as healthy, repairable or non-repairable. It changes nothing and finishes fast.
You suspect damage that nothing has flagged yet DISM /Online /Cleanup-Image /ScanHealth Scans the whole component store for corruption. It takes several minutes and repairs nothing.
SFC reports files it cannot fix DISM /Online /Cleanup-Image /RestoreHealth Rebuilds the store SFC repairs from, so a second SFC run can finish.
Windows Update fails with 0x80073712, 0x800f0831 or 0x800736CC RestoreHealth, then Windows Update again Microsoft lists these as component store corruption codes that DISM can fix.
Windows Update itself is broken or the PC is offline RestoreHealth with /Source and /LimitAccess Takes repair files from an ISO or another PC instead of Windows Update.
Windows will not start RestoreHealth with /Image from the recovery environment /Online only works on a running Windows installation.
CheckHealth reports the image is non-repairable Reinstall Windows Microsoft's guidance is to discard a non-repairable image rather than keep repairing it.
DISM online cleanup image ScanHealth output reporting no component store corruption
ScanHealth only scans and reports corruption; it takes several minutes but repairs nothing on its own. (Image: Microsoft Q&A)

How to run DISM commands safely on Windows 10 and 11

Requirement Detail
Administrator rights DISM and SFC only run from an elevated Command Prompt, PowerShell or Terminal window.
A repair source Windows Update by default. Without internet, a mounted image, a \sources\SxS folder or an install.wim file.
A matching source version The source must be the same Windows version. If the PC is patched further than the source, the repair can fail.
Time RestoreHealth and ScanHealth each take several minutes. Do not close the window mid-run.
Policy access on work PCs Group Policy Specify settings for optional component installation and component repair can redirect or block the repair source.

How to run DISM /RestoreHealth in Windows 11 and 10

The command is identical in Command Prompt, PowerShell and Windows Terminal. DISM options are not case sensitive, so /restorehealth works as well as /RestoreHealth.

  1. Type cmd or PowerShell in the taskbar search box.
  2. Right-click the result, select Run as administrator and approve the prompt.
  3. Optional: run DISM /Online /Cleanup-Image /CheckHealth for a quick verdict on the image.
  4. Optional: run DISM /Online /Cleanup-Image /ScanHealth for a full scan without repairs.
  5. Run DISM /Online /Cleanup-Image /RestoreHealth to scan and repair in one pass.
  6. Leave the window open until DISM prints its final result line.
  7. Read the final line. The restore operation completed successfully means the store is repaired.

Type the switch as /Cleanup-Image with a hyphen, exactly as Microsoft's syntax shows it. The title of this guide writes it with a space only because that is how people search for it.

Repair a Windows Image page showing ScanHealth, CheckHealth and the dism /online /cleanup image /restorehealth step
DISM /ScanHealth and /CheckHealth commands to check if the Windows image is repairable
Administrator Command Prompt running dism /online /cleanup-image /restorehealth
The title bar confirms the window is elevated, required before DISM or SFC commands will run. (Image: Microsoft Q&A)

Repair Windows image and system files with PowerShell

PowerShell has its own cmdlet for the same three checks. Run it in an elevated PowerShell or Terminal window.

DISM command PowerShell equivalent
DISM /Online /Cleanup-Image /CheckHealth Repair-WindowsImage -Online -CheckHealth
DISM /Online /Cleanup-Image /ScanHealth Repair-WindowsImage -Online -ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth Repair-WindowsImage -Online -RestoreHealth
RestoreHealth with a local source Repair-WindowsImage -Online -RestoreHealth -Source "E:\sources\SxS" -LimitAccess

Microsoft’s reference notes that ScanHealth and RestoreHealth each take several minutes, and that CheckHealth, ScanHealth, RestoreHealth, Source and LimitAccess work on images running Windows 8 or later.

DISM Overview on Microsoft Learn explaining that DISM is built into Windows and PowerShell
DISM.exe is built into Windows and also available through PowerShell

How long does DISM /RestoreHealth take?

Microsoft describes ScanHealth and RestoreHealth as taking several minutes; CheckHealth only reads a flag and finishes quickly. The real time depends on disk speed, how much is damaged and how fast Windows Update delivers replacement files, so a hard drive or a large repair can run far longer than an SSD with a healthy store.

  • Leave the window open and the PC plugged in until DISM prints its final line.
  • Do not start a second DISM or SFC run at the same time.
  • Pause large downloads so Windows Update can deliver repair files faster.

How to fix DISM /Online /Cleanup-Image /RestoreHealth stuck?

The progress bar often pauses at the same points, commonly around 20% and 62.3%, while DISM works through the store or waits on Windows Update. A long pause there is normal and is not proof that DISM has frozen.

  1. Wait. Give it at least an hour, longer on a hard drive, before you treat it as stuck.
  2. Open Task Manager and check whether DismHost.exe or TiWorker.exe is still using CPU or disk; activity means it is still working.
  3. If nothing has moved for hours, press Ctrl + C to cancel and restart the PC.
  4. Run DISM /Online /Cleanup-Image /StartComponentCleanup, then RestoreHealth again.
  5. If it stalls while downloading, switch to a local source with /Source:Wim:E:\sources\install.wim:<index> /LimitAccess.
  6. Read the last lines of %WINDIR%\Logs\DISM\dism.log to see where it stopped.

How to use an offline Windows image (ISO, WIM) as a DISM repair source

Use this when Windows Update cannot supply the files, or when RestoreHealth reports the source files could not be found. /LimitAccess stops DISM from falling back to Windows Update.

Microsoft recommends original release media patched to the latest cumulative update. A source older than the installed Windows may lack the files the PC needs.

  1. Download the ISO for your Windows version from Microsoft's official Download Windows 11 page, or plug in existing Windows install media.
  2. Mount the ISO from an elevated PowerShell window with Mount-DiskImage -ImagePath "C:\Users\<you>\Downloads\Win11.iso", using your file's real path.
  3. Note the drive letter the mounted ISO received in File Explorer, for example E:.
  4. List the editions inside the image with DISM /Get-ImageInfo /ImageFile:E:\sources\install.wim.
  5. Note the Index number whose Name matches the edition installed on the PC, such as Windows 11 Pro.
  6. Run DISM /Online /Cleanup-Image /RestoreHealth /Source:Wim:E:\sources\install.wim:6 /LimitAccess, replacing E and 6 with your drive letter and index.
  7. Wait for The restore operation completed successfully before closing the window.

The Wim: prefix and the :index suffix are required when the source is a .wim file. You can also point /Source at a mounted image's Windows folder, a \sources\SxS folder, or a shared \\<servername>\c$\windows folder on a PC running the same Windows version.

If you list several /Source locations, DISM copies from the first one that has the file and ignores the rest. Microsoft documents the Wim: source syntax for .wim files; if the sources folder holds no install.wim, use Windows Update or another PC as the source instead.

DISM AnalyzeComponentStore command and output fields for the WinSxS folder size
DISM /Cleanup-Image /AnalyzeComponentStore command and its output

Checking and repairing the Windows component store

RestoreHealth is one of several /Cleanup-Image operations. These are the ones worth knowing on a home or office PC; run each one from an elevated window.

Command What it does Use it when
DISM /Get-WimInfo /WimFile:E:\sources\install.wim Lists the images and editions inside a .wim file. /Get-ImageInfo /ImageFile: is the current name for the same job. You need the index number for a /Source path.
DISM /Online /Cleanup-Image /AnalyzeComponentStore Reports the real size of the component store and whether cleanup is recommended. WinSxS looks large and you want facts before cleaning.
DISM /Online /Cleanup-Image /StartComponentCleanup Removes superseded component versions at once, with no 30-day grace period and no 1-hour timeout. You want to reclaim disk space after updates.
DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBase Removes every superseded component version. Installed updates can no longer be uninstalled. Only when you are sure you will not need to roll back an installed update.
DISM /Image:D:\ /Cleanup-Image /RestoreHealth /Source:... Repairs an offline Windows installation whose root folder is D:\. Windows will not start and you are working from recovery tools.
DISM /Cleanup-Mountpoints Deletes resources left by a corrupted mounted image. A DISM mount operation was interrupted.

To free more space after a repair, Disk Cleanup works alongside these commands, as our steps for cleaning up system files show. Never delete the WinSxS folder by hand. Microsoft warns that doing so can leave the PC unable to boot or update.

How to check if DISM repair worked

  1. Confirm RestoreHealth ended with The restore operation completed successfully.
  2. Run DISM /Online /Cleanup-Image /CheckHealth and confirm it no longer reports a repairable or non-repairable image.
  3. Run sfc /scannow and confirm it finds no violations, or repairs everything it finds.
  4. Open Settings > Windows Update and select Check for updates if a failed update started the problem.
  5. Confirm the update that failed before now installs.

What do the DISM /RestoreHealth results mean?

DISM writes two logs. %WINDIR%\Logs\DISM\dism.log records the DISM run itself, and %WINDIR%\Logs\CBS\CBS.log records what the servicing stack found and fixed.

Open either log in Notepad and scroll to the entries matching the time you ran the command. In CBS.log, look for the Summary block.

What you see What it means What to do next
The restore operation completed successfully The component store is repaired or was already healthy. Run sfc /scannow.
CheckHealth: image is repairable Corruption was flagged and can be fixed. Run RestoreHealth.
CheckHealth: image is non-repairable The store is beyond DISM repair. Reinstall Windows, keeping your files.
Error 0x800f081f CBS_E_SOURCE_MISSING: the repair source did not have the files. Use a matching ISO with /Source and /LimitAccess.
Error 0x800f0906 CBS_E_DOWNLOAD_FAILURE: DISM could not download from Windows Update. Fix the connection or use a local source.
CBS.log: Total Detected Corruption higher than Total Repaired Corruption Some damage remains after the run. Repeat with a source that matches the installed build.
CBS.log: CSI Payload Corrupt or CBS MUM Missing lines A named file or package is damaged or absent. The version number in the line shows which update the file came from.

What to do if DISM /RestoreHealth fails

Check the most common causes first: a Command Prompt window without administrator rights, no internet connection, or a repair source from a different Windows version.

"The source files could not be found" or error 0x800f081f

Windows Update or your /Source location did not contain the files DISM needed.

  1. Get an ISO of the same Windows version as the PC, updated as recently as possible.
  2. Find the right index with DISM /Get-ImageInfo /ImageFile:E:\sources\install.wim.
  3. Run DISM /Online /Cleanup-Image /RestoreHealth /Source:Wim:E:\sources\install.wim:<index> /LimitAccess.
  4. If it still fails, use another PC running the same version: /Source:\\<servername>\c$\windows /LimitAccess.

DISM cannot download files from Windows Update (0x800f0906)

Windows Update is broken, blocked or unreachable, so DISM has no repair source.

  1. Confirm the PC is online and the date and time are correct.
  2. Open Settings > System > Troubleshoot > Other troubleshooters.
  3. Find Windows Update and select Run, then follow the prompts.
  4. Restart, then run RestoreHealth again.
  5. If downloads still fail, switch to the ISO source with /LimitAccess.

Work or school PC ignores Windows Update as a source

Group Policy sets a different repair source or blocks Windows Update for repairs.

  1. Open Edit Group Policy, then go to Computer Configuration > Administrative Templates > System.
  2. Open Specify settings for optional component installation and component repair to see the configured source.
  3. On a managed PC, ask IT for the approved repair source instead of changing the policy.

How to use DISM offline to repair a Windows image

/Online only services a running Windows installation.

  1. Open Advanced startup: hold Shift while selecting Restart on the sign-in screen, or enable the F8 boot menu beforehand.
  2. Open the Command Prompt window from the recovery tools. Enter the BitLocker recovery key if asked.
  3. Type dir D:\ (then C:\, E:\) to find the drive that contains the Windows folder.
  4. Run DISM /Image:D:\ /Cleanup-Image /RestoreHealth /Source:Wim:E:\sources\install.wim:<index>, using your Windows drive and media drive letters.
  5. Restart and let Windows boot normally.

Repair keeps failing or the image is non-repairable

The component store is damaged beyond what DISM can fix.

  1. Back up your files.
  2. On Windows 11, version 22H2 or later, use the Reinstall Windows option in Microsoft's recovery options. It keeps files, apps and settings.
  3. If that is not available, use Reset this PC and choose to keep your personal files.
Windows recovery Choose an option screen used to run DISM RestoreHealth offline
Advanced startup opens this screen; select Troubleshoot to reach the Command Prompt for offline repairs. (Image: Microsoft)

DISM vs SFC: which one should you run first?

SFC checks and replaces the protected system files Windows is using; DISM repairs the component store those replacements come from. Microsoft’s procedure runs DISM first and SFC second. Neither tool fixes a failing disk, so if errors keep coming back, scan the drive with chkdsk as well.

DISM fixes the store; SFC then fixes the protected files in use. Run SFC in the same elevated window right after DISM succeeds.

sfc /scannow

Scans every protected system file and replaces damaged ones with the copy from the component store that DISM just repaired.

You should see: Windows Resource Protection did not find any integrity violations, or found corrupt files and successfully repaired them.

Administrator Command Prompt running sfc /scannow after DISM image repair
Run sfc /scannow in the same elevated window once DISM finishes. (Image: Microsoft Support)

Every SFC result message, safe-mode runs and the SFC log are explained in our sfc /scannow guide.

DISM RestoreHealth FAQ

How do I repair a DISM image?

Open Command Prompt as administrator and run DISM /Online /Cleanup-Image /RestoreHealth. If it reports missing source files, repeat it with /Source:Wim:E:\sources\install.wim:<index> /LimitAccess pointing at a mounted Windows ISO of the same version. Finish with sfc /scannow.

How long should DISM /Online /Cleanup-Image /RestoreHealth take?

Microsoft describes RestoreHealth as taking several minutes. ScanHealth takes a similar time, while CheckHealth only reads an existing flag and finishes quickly. Leave the elevated window open until DISM prints its final result line, and do not close it mid-run.

Do I need an internet connection to run DISM RestoreHealth?

Only for the default source. DISM downloads good files from Windows Update. Without internet, add /Source pointing at a mounted ISO's install.wim, a mounted image or a shared Windows folder, and add /LimitAccess so DISM does not try Windows Update.

Should I run SFC or DISM first?

Run DISM first. Microsoft's own procedure puts DISM.exe /Online /Cleanup-Image /RestoreHealth before sfc /scannow, because SFC replaces damaged system files with copies from the component store. If the store is damaged, SFC has nothing good to copy.

What does "The restore operation completed successfully" mean?

It means DISM finished and the component store is healthy, either repaired or clean from the start. It does not mean every system file in use is fixed. Run sfc /scannow next to repair those files from the restored store.

What should I do if DISM fails with source files could not be found?

Give DISM a local source. Mount a Windows ISO of the same version, find the edition index with DISM /Get-ImageInfo, then run RestoreHealth with /Source:Wim:<drive>:\sources\install.wim:<index> /LimitAccess. A source older than the installed updates can still fail.

Can DISM repair an offline Windows image?

Yes. Replace /Online with /Image: followed by the root folder of the offline Windows installation, for example DISM /Image:D:\ /Cleanup-Image /RestoreHealth /Source:Wim:E:\sources\install.wim:1. This works from recovery tools when Windows will not start.

Is DISM RestoreHealth stuck at 62.3% normal?

A long pause around 20% or 62.3% is common and usually means DISM is still working. Check Task Manager for DismHost.exe or TiWorker.exe activity and wait at least an hour before cancelling.

Does the DISM image repair command work in PowerShell?

Yes. DISM /Online /Cleanup-Image /RestoreHealth runs the same way in Command Prompt, PowerShell and Windows Terminal, and Repair-WindowsImage -Online -RestoreHealth is the PowerShell cmdlet for the same repair. Open the window with Run as administrator first, because DISM servicing commands need an elevated session.

Best practices for DISM, SFC, and system recovery

Run DISM /Online /Cleanup-Image /RestoreHealth first, then sfc /scannow, and switch to an ISO source with /LimitAccess only when Windows Update cannot supply the files. SFC can only repair from a healthy component store, and a repair source that matches the installed Windows version is what decides whether DISM succeeds.

Philip Celasco

Philip is a Texas-based technology writer and IT administrator at Techdows.com with more than 10 years of experience creating practical content for everyday users and professionals. He specializes in web browsers, particularly Chromium-based platforms such as Google Chrome, Microsoft Edge, Brave, and Opera. Through his work as an IT administrator, Philip has hands-on experience managing devices, configuring browser policies, troubleshooting software and network issues, and helping people resolve problems that affect productivity and security. His articles are based on practical testing and real-world technical experience. He covers browser settings, extensions, performance problems, privacy controls, security features, and Windows troubleshooting. Outside work, Philip enjoys the quieter side of life in Texas and stepping away from the screen when he can. He has two kids, two cats and loves to play golf with his mother during the weekends.

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *