ITHelpLinks

How-to

Repair Windows System Files with DISM and SFC

How to run DISM and the System File Checker (sfc /scannow) from an elevated Command Prompt, based on Microsoft's own support guidance.

Illustration of two command-prompt windows labelled 1 and 2, linked by an arrow, with a gear symbol.
Short answer

Run DISM first, then the System File Checker, both from an elevated Command Prompt (Run as administrator). Microsoft's DISM command is DISM.exe /Online /Cleanup-image /Restorehealth, and sfc /scannow then replaces corrupted protected files with a cached copy. Back up before repairs.

What the System File Checker does

Windows has protected system files that it needs to run properly. Microsoft's support article says:

The sfc /scannow command will scan all protected system files and replace corrupted files with a cached copy.

In our opinion it is not a cure-all, and it cannot fix a failing drive or other hardware fault.

Step 1: open an elevated Command Prompt

The tool needs administrator rights. Microsoft's instructions say to right-click Command Prompt and then select Run as administrator. This is called an elevated prompt. If you run the command in an ordinary window, it will not have the permissions it needs.

Step 2: run DISM first

Microsoft states:

You should run DISM prior to running the System File Checker.

The command given on the same page is:

DISM.exe /Online /Cleanup-image /Restorehealth

Let it finish before you do anything else. We have not quoted how long it takes because Microsoft's page does not say.

Step 3: run the System File Checker

After DISM, run:

sfc /scannow

Wait for it to complete. The scan checks all protected system files and replaces corrupted ones with a cached copy, as Microsoft describes.

The steps in short

  1. Open Command Prompt as administrator (right-click Command Prompt, then select Run as administrator).
  2. Run DISM.exe /Online /Cleanup-image /Restorehealth and wait for it to finish.
  3. Run sfc /scannow and wait for it to finish.

That order follows Microsoft's statement that DISM should be run prior to the System File Checker.

DISM first, then SFCFlow chart. Open Command Prompt as administrator. Step 1, run DISM.exe /Online /Cleanup-image /Restorehealth. Step 2, run sfc /scannow.0Open an elevated Command PromptRight-click, then Run as administrator1Run DISM firstDISM.exe /Online/Cleanup-image /Restorehealth2Then run the System File Checkersfc /scannow
Figure 1. The order Microsoft gives: DISM first, then the System File Checker.

What this guide does not cover

Microsoft's article is the only source we checked for this post. We have therefore not described the messages these tools can display, or what to do for each message. If a tool reports a result you do not understand, do not guess. Note the text and ask a technician or Microsoft support.

Sensible precautions (our opinion)

The following advice is our own and is not from the Microsoft article.

  • Back up first. Repairs are usually safe, but a backup costs little. See our backup guide.
  • Restart afterwards and check whether the original problem is gone.
  • Copy any message you see. If the tools report problems they cannot fix, a technician will want the exact text.
  • Do not paste commands from unknown websites into an administrator prompt. Use the vendor's own pages.
  • Persistent faults can mean failing hardware. If crashes continue, read our post on hard drive warning signs.

Sources

  1. Use the System File Checker tool to repair missing or corrupted system files. Microsoft Support. https://support.microsoft.com/en-us/topic/use-the-system-file-checker-tool-to-repair-missing-or-corrupted-system-files-79aa86cb-ca52-166a-92a3-966e85d4094e. Date shown: no date shown. Accessed 31 October 2026.

Items marked "our opinion", "our view" or "tip" are the author's own and are not from these sources. This post is general information, not medical, legal or professional advice.

Related posts

Back to all ITHelpLinks articles

Want to check your own PC?

ITHelpLinks scans your computer for free and explains what it finds in plain language.

Register free