System

Repair corrupted Windows system files

Run DISM and SFC in Microsoft’s recommended order.

Risk: LowAdmin: YesRestart: Recommended

Before you start

  • Install current Windows updates and restart first if Windows Update is working.
  • These commands must be run from an elevated Command Prompt.
1

Open Command Prompt as administrator

Search for Command Prompt, right-click it and choose Run as administrator. Approve the User Account Control prompt.

2

Run DISM first

Enter the command below and wait for “The operation completed successfully.” DISM may take a while before the progress visibly moves.

DISM.exe /Online /Cleanup-image /Restorehealth
3

Run System File Checker

After DISM completes successfully, run SFC and leave the window open until verification reaches 100%.

sfc /scannow
4

Restart and retest

Restart Windows, then repeat the action that was failing. If SFC reports files it could not repair, use Microsoft’s detailed SFC guidance or move to recovery options.

Microsoft source

This guide is independently written and condensed from current Microsoft Support guidance. If your Windows build differs or the problem persists, use the official source for the full decision tree.

Open Microsoft Support ↗
← Back to all guides