When these commands are worth trying

Windows includes both tools, so there is nothing to download. They are useful when Windows Update fails, built-in features stop opening, the system becomes unstable after an interrupted update, or an error mentions missing or corrupted system files.

They are not general performance boosters. If the PC is slow because the disk is nearly full, memory is insufficient, or a drive is failing, these commands will not remove the underlying cause.

Before you start

  1. Save open work and connect a laptop to power.
  2. Make sure the system drive has free space.
  3. Keep the internet connection available because DISM may need Windows Update as a repair source.
  4. Do not close the terminal or force the PC off while a command is running.

Step 1: Open an elevated terminal

Open Start, search for Terminal or Command Prompt, right-click it, and choose Run as administrator. Approve the User Account Control prompt.

The commands will fail or provide incomplete results when the terminal is not elevated.

Step 2: Repair the Windows image with DISM

Run:

DISM.exe /Online /Cleanup-Image /RestoreHealth

/Online targets the Windows installation currently running. /Cleanup-Image selects servicing operations, and /RestoreHealth scans for component-store corruption and attempts a repair.

The percentage can appear stuck for several minutes. Leave the window open until DISM reports that the operation completed or displays an error code.

Step 3: Check protected system files with SFC

After DISM completes successfully, run:

sfc /scannow

SFC verifies protected Windows system files and replaces damaged copies when a valid repair source is available. Wait for verification to reach 100 percent.

What the SFC result means

  • Windows Resource Protection did not find any integrity violations: protected system files appear intact.
  • Windows Resource Protection found corrupt files and successfully repaired them: restart Windows and test the original problem again.
  • Windows Resource Protection found corrupt files but was unable to fix some of them: restart and repeat DISM followed by SFC. If the result persists, inspect the CBS log or use Windows recovery options.
  • Windows Resource Protection could not perform the requested operation: try Safe Mode or check the file system before running SFC again.

If DISM fails

Check the exact error code first. Confirm that Windows Update is working, restart the PC, and retry once. Managed work computers may block the repair source through policy, so contact the administrator instead of changing update policy yourself.

Advanced repairs can use a matching Windows installation image as the source, but the edition, language, and build must be compatible. Do not copy an unverified command that points to an unrelated ISO.

After the repair

Restart Windows, install pending updates, and reproduce the original problem. If the same failure continues, check storage health, available memory, startup applications, malware, and recent driver or software changes rather than repeatedly running SFC.