Windows Commands / IT Support Guides
Repair Windows components with DISM and SFC
Repair the Windows component store with DISM, then check protected system files with SFC.
Environment and inputs: Windows 11 · Command Prompt unless PowerShell is specified
Understand the problem
Check applicable updates, follow the maintenance policy for the computer and open Command Prompt as an administrator.
Run the command
Run DISM first. RestoreHealth can repair the Windows component store. Wait for a successful result before running sfc /scannow, which can replace damaged protected system files.
DISM.exe /Online /Cleanup-Image /RestoreHealth
sfc /scannow
Read the output
Read the final message from each tool. SFC can report no integrity violations, successful repairs, or files it could not repair.
Choose the next step
If DISM fails, record its error code and check the available repair source before proceeding. If SFC cannot repair all files, save its result and review the relevant Windows logs.
Before making changes
Allow time for the repair to finish. Afterward, repeat the action that originally failed to see whether the symptom is resolved.