> ## Documentation Index
> Fetch the complete documentation index at: https://help.freakhosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SFC /scannow and DISM /RestoreHealth on Windows Server

> Run DISM /Online /Cleanup-Image /RestoreHealth, then sfc /scannow, to repair corrupted system files on Windows Server. Includes ISO repair source and CBS.log checks.

To repair corrupted system files on Windows Server, open an elevated Command Prompt and run `DISM.exe /Online /Cleanup-image /Restorehealth` first, then `sfc /scannow`. DISM repairs the Windows component store; SFC then uses that store to replace damaged system files. If DISM can't download repair files (error `0x800f081f`), point it at the `install.wim` on a Windows Server ISO with `/Source` and `/LimitAccess`.

| Difficulty | Time | Works on | Needs |
| - | - | - | - |
| Beginner | 15 to 45 minutes | Windows Server 2019 / 2022 / 2025 | Administrator access, internet access or a matching ISO |

## Before you start

* Use an elevated prompt: search **Start** for **Command Prompt** or **PowerShell**, right-click it and choose **Run as administrator**.
* DISM downloads repair files from Windows Update by default, so the server needs internet access.
* If Windows doesn't start at all, see [Windows Server not booting](https://help.freakhosting.com/portals/other/how-to-fix-windows-server-not-booting.md) for the offline commands.

## When to use SFC and DISM

Use them when Windows Update fails with corruption errors (for example `0x80073712` or `0x800f0831`), when built-in tools or roles crash or won't install, or after an unexpected shutdown left the system unstable. They don't fix problems in your own applications or data.

## How to run DISM and SFC

**1. Check the component store (optional)**

A quick check that reports whether corruption was already detected:

```bat theme={null}
DISM /Online /Cleanup-Image /CheckHealth
```

The result is healthy, repairable or non-repairable. For a full scan, use `/ScanHealth` instead; it takes several minutes.

**2. Repair the component store**

```bat theme={null}
DISM.exe /Online /Cleanup-image /Restorehealth
```

Wait for `The restore operation completed successfully.` It can take several minutes; don't close the window.

**3. Repair system files**

```bat theme={null}
sfc /scannow
```

Keep the window open until `Verification 100% complete.`

**4. Restart**

Restart the server, then retry what failed before.

The PowerShell equivalent of the DISM step is:

```powershell theme={null}
Repair-WindowsImage -Online -RestoreHealth
```

## What the SFC result means

| Message | Meaning |
| - | - |
| `Windows Resource Protection did not find any integrity violations.` | No damaged system files. |
| `Windows Resource Protection found corrupt files and successfully repaired them.` | Repaired. Restart the server. |
| `Windows Resource Protection found corrupt files but was unable to fix some of them.` | Run DISM again, then SFC. If it still fails, check the log below. |
| `Windows Resource Protection could not perform the requested operation.` | Run SFC in Safe Mode, or offline from the recovery environment. |

To see which files SFC found, extract its entries from the log to your desktop:

```bat theme={null}
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"
```

## How to fix "The source files could not be found" (0x800f081f)

DISM couldn't download the repair files, usually because Windows Update is blocked or broken. Use the Windows Server installation ISO for the same version and edition instead.

**1. Mount the ISO**

On a VPS, attach the ISO with [mount custom ISOs](https://help.freakhosting.com/portals/vps-panel/how-to-mount-custom-isos-and-configure-boot-order.md), or download it inside Windows, right-click it and choose **Mount**. Note the drive letter, for example `D:`.

**2. Find the right image index**

```powershell theme={null}
Get-WindowsImage -ImagePath D:\sources\install.wim
```

Note the **ImageIndex** of your edition, for example **Windows Server 2022 Standard (Desktop Experience)**.

**3. Repair from the ISO**

Replace `2` with your index:

```bat theme={null}
DISM /Online /Cleanup-Image /RestoreHealth /Source:Wim:D:\sources\install.wim:2 /LimitAccess
```

`/LimitAccess` stops DISM from trying Windows Update.

**4. Run SFC again**

Run `sfc /scannow` and restart.

> [!WARNING]
>
> Use an ISO of the same Windows Server version (2019, 2022 or 2025) and edition as the installed system, and the index of that edition.

## How to check it worked

Run `sfc /scannow` once more. It should end with `Windows Resource Protection did not find any integrity violations.` Then retry what failed before, such as Windows Update.

## Frequently asked questions

### Should I run SFC or DISM first?

Microsoft's order is DISM first, then SFC. SFC repairs files from the component store, so the store must be healthy first.

### Where is the DISM log?

DISM logs to `C:\Windows\Logs\DISM\dism.log`. Component servicing details are in `C:\Windows\Logs\CBS\CBS.log`.

### Can I run SFC when Windows won't start?

Yes, from the recovery environment: `SFC /Scannow /OffBootDir=C:\ /OffWinDir=C:\Windows`. The drive letter can differ there. See [Windows Server not booting](https://help.freakhosting.com/portals/other/how-to-fix-windows-server-not-booting.md).

### DISM still fails with a repair source. What now?

Check `CBS.log` for the failing package, then reinstall from a backup or [rebuild the VPS](https://help.freakhosting.com/portals/vps-panel/how-to-rebuild-and-reinstall-your-vps.md) after saving your data.

## Related guides

> [card] [VPS and dedicated server guides](https://help.freakhosting.com/portals/other/vps-and-dedicated-server-guides.md)
>
> Every guide in this section.

> [card] [Windows Update stuck or failing](https://help.freakhosting.com/portals/other/how-to-fix-windows-update-stuck-or-failing.md)
>
> Reset Windows Update components.

> [card] [Windows Server not booting](https://help.freakhosting.com/portals/other/how-to-fix-windows-server-not-booting.md)
>
> Startup Repair and offline fixes.

> [card] [Free up disk space](https://help.freakhosting.com/portals/other/how-to-free-up-disk-space-on-windows-server.md)
>
> Clean the component store.

> [card] [Mount a custom ISO](https://help.freakhosting.com/portals/vps-panel/how-to-mount-custom-isos-and-configure-boot-order.md)
>
> Attach a Windows Server ISO.

***

> [!NOTE]
>
> **Checked against [Microsoft Learn: Fix Windows Update corruptions](https://learn.microsoft.com/en-us/troubleshoot/windows-server/installing-updates-features-roles/fix-windows-update-errors), [Repair a Windows image](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/repair-a-windows-image?view=windows-11), [Configure a Windows repair source](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/configure-a-windows-repair-source?view=windows-11) and [Microsoft Support: System File Checker](https://support.microsoft.com/en-us/windows/experience/backup-recovery/use-the-system-file-checker-tool-to-repair-missing-or-corrupted-system-files)** on 4 November 2026. Commands were not tested on a live Windows server for this page.

> [!NOTE]
>
> ### Need Extra Help?
>
> If you encounter any issues, our support team is ready to assist:
>
> * **Live Chat:** Quick assistance via our website.
> * **Support Ticket:** [Open a Ticket](https://freakhosting.com/clientarea/submitticket.php)
> * **Discord:** [Join our Community](https://discord.gg/freakhosting)
> * **Email:** [support@freakhosting.com](mailto:support@freakhosting.com)

> [!TIP]
>
> ### Save on Your Hosting
>
> Ready to upgrade your hosting? Use code **KB20** at checkout for **20% off** your first order!

***

**Last Updated:** November 2026


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.