A user reports that Settings closes the moment it opens. You remote in, start sfc /scannow from an elevated Command Prompt, and fifteen minutes later it reports that it found corrupt files but couldn’t fix some of them. Running the same scan again gets the same answer. What’s missing is a plan for what that result actually means.

That’s the problem with how SFC usually gets used. It’s run as a fix, when it’s really a test. When the result is clean, the fault is somewhere else, so running the scan again won’t help. When the result is a failure, the scan has told you where to look next, and that’s often the component store. Here’s everything else you need to know.

Quick fix: repair the component store, then run SFC

If a user needs the device working now, this sequence covers most system file corruption and runs entirely over a remote PowerShell session. The sections below explain what each result means and what to do when this doesn’t work. This runs DISM before SFC, which is Microsoft’s recommended order when you suspect corruption, because DISM repairs the component store that SFC copies clean files from. If you want SFC’s result as a diagnostic first, run sfc /scannow on its own and read the result as described below.

  1. In an elevated PowerShell session, run DISM /Online /Cleanup-Image /RestoreHealth and wait for The restore operation completed successfully
  2. Run sfc /scannow and let verification reach 100%
  3. Read the final Windows Resource Protection line. If it reports that corrupt files were repaired, arrange a restart with the user and retest the original fault

System file repair by hand vs. with Robin by Atera

Here’s what each stage of the repair takes a technician by hand, next to what Robin by Atera does for you.

Stage

By hand

With Robin by Atera

Run the repair

Remote in, open an elevated session, run DISM /Online /Cleanup-Image /RestoreHealth, then sfc /scannow, and wait for both to finish

Robin runs the supported system file repair workflow when Windows components appear damaged

Confirm the outcome

Read the final SFC result line, then pull failed entries from CBS.log if anything couldn’t be repaired

Robin returns whether corruption was fixed

Handle what’s left

Decide on a repair source, an offline repair, or an in-place repair

Stays with your technicians, starting from the result Robin returns

Everything after this table is the manual route.

Run SFC and read what it tells you

Running SFC is just one command, so it’s the easy part. What takes judgment is reading its result and knowing what each one means for the next step, and that’s where most system file repairs stall.

Follow these stages:

Run the scan and act on the result

Start with SFC when the symptoms point at Windows itself: built-in apps or Settings pages that won’t open, missing DLL errors, or features that broke after an update. SFC checks protected Windows system files against the versions Windows expects and replaces damaged or missing ones with clean copies from the component store. It doesn’t touch user data, third-party applications, drivers, or hardware. If the fault lives in one of those, a clean SFC result is the expected outcome, not a sign the scan missed something.

  1. Open Start, type cmd, and select Run as administrator under Command Prompt, then select Yes at the UAC prompt. An elevated PowerShell session works the same way, including over a remote session
  2. Run sfc /scannow and leave the window open until verification reaches 100%

    SFC command in CMD
  3. Read the final Windows Resource Protection line and match it to the table below

    SFC result in CMD

    Result message

    What it means

    What to do next

    Windows Resource Protection did not find any integrity violations

    Protected system files are intact

    Look past Windows: the application and its crash logs, drivers, malware, or failing hardware

    Windows Resource Protection found corrupt files and successfully repaired them

    SFC replaced damaged files from the component store

    Restart, then retest the original fault before closing the ticket

    Windows Resource Protection found corrupt files but was unable to fix some of them

    SFC’s replacement source is damaged or missing files

    Check CBS.log and repair the component store (see "When SFC finds corruption it can’t fix" below)

    Windows Resource Protection could not perform the requested operation

    The scan didn’t complete

    See the next subsection

    Windows Resource Protection could not start the repair service

    The Windows Modules Installer service isn’t running

    See the next subsection

    There is a system repair pending which requires reboot to complete

    A servicing operation is waiting on a restart

    Restart Windows and run SFC again

A “repaired” result isn’t the end of the job either. It only means SFC replaced files, not that the user’s problem is gone.

“If Windows says it repaired something, I go back and test whatever was broken in the first place. That’s how I tell whether the repair actually solved the problem.”

Atera’s RMM lets you run this fix through remote script deployment. Save time by targeting devices that show signs of system file corruption, rather than running it across the whole fleet. And if you need help with the script, AI Copilot can write it for you. Here’s an example of what that script might look like:

The Script:

Atera does not guarantee the integrity, availability, security, virus-free, safety, lawfulness, non-infringement, rights’ status, or functionality of the scripts. The use of the shared scripts is at your own risk. Scripts are provided “AS IS”. *

$folder = "$env:ProgramData\WindowsRepair\SFC-DISM"
New-Item -ItemType Directory -Path $folder -Force | Out-Null

# Repair the component store first so SFC has clean copies to work from
dism.exe /Online /Cleanup-Image /RestoreHealth | Out-File "$folder\DISM.txt"
$dismExit = $LASTEXITCODE

# SFC writes UTF-16 output, so strip null characters before matching results
$sfcText = (sfc.exe /scannow | Out-String) -replace "`0", ""
$sfcExit = $LASTEXITCODE
$sfcText | Out-File "$folder\SFC.txt"

$status = 'Review SFC log'
switch -Regex ($sfcText) {
    'system repair pending' { $status = 'Restart required, then rerun'; break }
    'could not (perform|start)' { $status = 'SFC did not run'; break }
    'unable to fix some of them' { $status = 'Unrepaired corruption'; break }
    'successfully repaired them' { $status = 'Files repaired'; break }
    'did not find any integrity violations' { $status = 'No corruption found'; break }
}

Write-Output "DISM exit code: $dismExit"
Write-Output "SFC exit code: $sfcExit"
Write-Output "SFC result: $status"
Write-Output "Logs: $folder"

if ($dismExit -ne 0 -or $status -notin @('Files repaired', 'No corruption found')) {
    exit 1
}
Script copied to clipboard

SFC’s exit codes aren’t dependable, so the script reads the result text. The exit code lines are there for the record only.

The script doesn’t restart devices. Arrange remote restarts with users for anything that reports Files repaired or Restart required, then rerun. Allow enough time for both commands to finish, and treat a run that times out as unfinished rather than clean.

With Robin by Atera: For a routine end-user case, Robin runs the supported system file repair workflow when Windows components appear damaged and returns whether corruption was fixed, so a technician doesn’t need to run DISM and SFC first.

What if SFC won’t run?

When SFC returns “could not perform the requested operation” or “could not start the repair service,” it hasn’t checked anything yet. The usual causes are a pending restart, a disabled servicing service, or file system errors. Work through them in order from an elevated PowerShell session, and rerun sfc /scannow after each fix:

  1. Check for a pending servicing restart with Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending"
  2. If it returns True, arrange a restart with the user before going further

    Check for pending service restart
  3. Check the Windows Modules Installer service with Get-Service TrustedInstaller | Select-Object Status, StartType. Its normal startup type is Manual

    Check Windows Modules Installer service
  4. If the startup type is Disabled, set it back with Set-Service -Name TrustedInstaller -StartupType Manual. You can also do this in services.msc
  5. Start the service with Start-Service TrustedInstaller
  6. Scan the system drive for file system errors with chkdsk C: /scan. The scan runs online and doesn’t need a restart
  7. If CHKDSK reports errors, schedule a repair with cmd /c "echo Y | chkdsk C: /f". That answers the prompt to run at the next restart. Then arrange the restart with the user
  8. If SFC still won’t run, restart the device into Safe Mode and run sfc /scannow there. This step needs the user or hands on the device
  9. As a last resort, boot into Windows Recovery Environment, open Command Prompt, and confirm the Windows drive letter with diskpart and list volume. Then run sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows, replacing C: with the letter you found

When SFC finds corruption it can’t fix

“Windows Resource Protection found corrupt files but was unable to fix some of them” means SFC couldn’t find clean copies to repair from, so running it again won’t change the result. You need to repair or replace that source.

Here are the steps:

Step 1: Find the failed files in CBS.log

SFC writes its findings to the component-based servicing log, mixed in with every other servicing operation. Pulling out the SFC entries first tells you which files and components failed, so every repair after this has a target.

  1. In an elevated Command Prompt, run findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%TEMP%\sfcdetails.txt"
  2. Open the extract with notepad "%TEMP%\sfcdetails.txt"
  3. Search for Cannot repair member file and note each file and component it names
  4. Check that those entries’ timestamps match your latest scan. CBS.log keeps results from earlier runs, so an old failure can look current

Over a remote PowerShell session, Select-String -Path "$env:windir\Logs\CBS\CBS.log" -Pattern 'Cannot repair member file' | Select-Object -Last 20 returns the most recent failures straight to the console.

Failures logged before a later scan that came back clean can be ignored. A current failure can’t, even if the device seems to work.

Step 2: Repair the component store and run SFC again

SFC repairs files from the component store, so a damaged store means SFC has nothing clean to copy from. Repairing the store with DISM and then rerunning SFC fixes most cases. Run both in the same elevated session:

  1. Run DISM /Online /Cleanup-Image /RestoreHealth and wait for The restore operation completed successfully. By default, DISM downloads replacement files from Windows Update

    DISM command on CMD
  2. Run sfc /scannow and let it reach 100%
  3. Run the CBS.log extract again to check whether the same files still fail

If DISM stops with error 0x800f081f, it couldn’t reach a repair source. The next subsection covers that.

If DISM completes but SFC still can’t repair the same file, replace that file with a known-good copy from a healthy device on the same build, edition, and update level:

  1. Take ownership of the damaged file with takeown /f <file>
  2. Grant administrators full access with icacls <file> /grant administrators:F
  3. Copy the good file over it with copy <source file> <file>

If more than one or two files fail this way, or they keep failing, stop replacing files one at a time. That pattern points to an in-place repair.

With Robin: For a routine end-user case, Robin takes over this whole repair-and-rerun loop. It runs the supported repair workflow and returns whether the corruption was fixed, so a technician only needs to step in when the answer is no.

» Learn more about using the DISM command correctly

Step 3: Fix DISM error 0x800f081f with a local repair source

“Error: 0x800f081f The source files could not be found” means DISM couldn’t download clean files. It’s common on IT managed devices that get updates from WSUS or have Windows Update restricted.

The fix is to give DISM a local source that matches the installed build and tell it not to look anywhere else. Every step below works over a remote PowerShell session:

  1. Check the installed build with Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" | Select-Object DisplayVersion, CurrentBuild, UBR, EditionID. UBR is the update revision, the number after the dot in the OS build
  2. Mount a Windows 11 ISO for the same version and note its drive letter with (Mount-DiskImage -ImagePath "C:\ISO\Win11_x64.iso" -PassThru | Get-Volume).DriveLetter
  3. Confirm the image file with dir D:\sources\install.*. If the media holds install.esd instead of install.wim, export the edition you need to a WIM with DISM /Export-Image /SourceImageFile:D:\sources\install.esd /SourceIndex:6 /DestinationImageFile:C:\Temp\install.wim /Compress:max /CheckIntegrity, using the index you find in the next step, and point the remaining commands at C:\Temp\install.wim

    Confirm image file command in CMD
  4. List the editions in the image with DISM /Get-WimInfo /WimFile:D:\sources\install.wim and note the index of the installed edition

    DISM list editions command
  5. Check that index with DISM /Get-WimInfo /WimFile:D:\sources\install.wim /Index:6. Edition, Architecture, and Languages must match the device, and Version must match its build

    Check index match with DISM
  6. Run the repair against that source with DISM /Online /Cleanup-Image /RestoreHealth /Source:WIM:D:\sources\install.wim:6 /LimitAccess. /LimitAccess stops DISM from trying Windows Update or WSUS
  7. Run sfc /scannow again

To fix this across a fleet, set the repair source once in Group Policy instead of mounting media on each device. Under Computer Configuration > Administrative Templates > System, enable Specify settings for optional component installation and component repair. Point its alternate source path at a serviced WIM on a network share, for example Wim:\\server\images\install.wim:6. Devices then use that source when DISM repairs the component store. Keep the WIM current with each cumulative update, or the update-level problem returns. For a one-off fix on selected devices, run the /Source and /LimitAccess command through Atera’s remote PowerShell execution against the same share.

» Here’s how to simplify group policy management with Atera

Step 4: Repair offline from Windows Recovery Environment

When the online repair keeps failing or Windows won’t reach the desktop, run SFC and DISM against the installation from Windows Recovery Environment (WinRE). Nothing on the installed system is running there, so nothing locks the files.

  1. If Windows still starts, open Settings > System > Recovery

    Recovery in system settings
  2. Next to Advanced startup, select Restart now

    Advanced startup in system settings
  3. From a remote session, run reagentc /boottore, then shutdown /r /t 0

    Remote advanced startup command
  4. From the restart onward, someone needs to be at the device. If Windows won’t start at all, boot from installation media and select Repair your computer
  5. On the Choose an option screen, select Troubleshoot

    Troubleshoot in WinRE
  6. Select Advanced options

    Advanced options in WinRE
  7. Select Command Prompt, then sign in with an administrator account. If the drive is BitLocker-encrypted, you’ll need the BitLocker recovery key to unlock it

    Command Prompt in WinRE
  8. Run diskpart, then list volume, to identify the Windows partition and the installation media. Drive letters in WinRE often differ from the ones Windows uses

    Diskpart list volume command
  9. Type exit to leave DiskPart, then confirm the Windows folder with dir C:\Windows, replacing C: with the letter you found
  10. Run sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
  11. If SFC still can’t repair files, create a working folder for DISM with md C:\DISMScratch. WinRE’s own temporary space is too small for a component store repair
  12. Repair the offline component store from the installation media with DISM /Image:C:\ /Cleanup-Image /RestoreHealth /Source:WIM:D:\sources\install.wim:6 /LimitAccess /ScratchDir:C:\DISMScratch. Check the source’s edition, index, and update level first, exactly as in the previous subsection
  13. Run the offline SFC command from step 6 again
  14. Type exit, then select Continue on the Choose an option screen to restart into Windows

Where Robin stops and your technicians start: Reading CBS.log for persistent failures, choosing and maintaining a repair source, replacing individual files, and repairing from WinRE all take judgment about builds, update levels, and the device in front of you, so they stay with your technicians. Robin’s system file repair use case covers running the supported repair workflow and returning whether corruption was fixed. Taking those routine cases off the queue is what gives your team time for the repairs above.

» Learn more about Windows startup repair

Know when to stop and run an in-place repair

Once DISM and SFC have run with a good source, rerunning them won’t produce a different result. If they haven’t fixed the problem, either the fault isn’t in Windows system files or the installation is damaged beyond file-level repair. An in-place repair reinstalls Windows over itself and keeps apps, files, and settings. Knowing when to use it saves hours of rerunning repairs that aren’t working.

The media must match the installed Windows edition, architecture, and system display language, and be the same build or newer.

  1. Mount the Windows 11 ISO or connect the installation media, run setup.exe, and select Yes at the UAC prompt
  2. Select Next and let Setup check for updates and compatibility
  3. When Setup shows what it will keep, select Change what to keep
  4. Select Keep personal files and apps, then Next

    Keep personal apps and files
  5. On the Ready to install screen, confirm that the correct edition is listed and that Keep personal files and apps is selected. If that option isn’t offered, stop. The media doesn’t match the installed Windows
  6. Select Install. The device restarts several times before it returns to the desktop
  7. When Windows is back, check that the user’s apps and files are intact, install any outstanding updates, and retest the original fault. Run sfc /scannow once more to confirm a clean baseline

If the device has internet access and someone is at it, Windows 11 can do the same repair without media. In Settings > System > Recovery, select Reinstall now next to Fix problems using Windows Update. It reinstalls the current version of Windows and keeps apps, files, and settings.

To run the media-based repair remotely, stage the ISO on the device and drive Setup from an elevated PowerShell session. Setup’s command-line options let it run unattended:

  1. Mount the ISO and note its drive letter with (Mount-DiskImage -ImagePath "C:\ISO\Win11_x64.iso" -PassThru | Get-Volume).DriveLetter
  2. Run a compatibility check without installing: $p = Start-Process "D:\setup.exe" -ArgumentList "/auto upgrade /quiet /eula accept /compat scanonly" -Wait -PassThru
  3. Read the result with '{0:X}' -f $p.ExitCode. C1900210 means no compatibility issues were found. Any other code means Setup found a blocker to resolve first
  4. Start the repair with Start-Process "D:\setup.exe" -ArgumentList "/auto upgrade /quiet /eula accept /noreboot /copylogs C:\Temp\SetupLogs". /auto upgrade keeps apps and data, and /noreboot holds the first restart so you can schedule it with the user
  5. Arrange the restart with the user, then confirm the result once the device checks back in

» Need more help? Here’s how to reset Windows 11 to factory settings

Take routine system file repair off the ticket queue

SFC is a test before it’s a fix. Its result tells you whether to look beyond Windows, repair the component store, give DISM a better source, or reinstall in place. Most system file problems end at the first or second of those steps, which means most of the time a technician spends on them goes into running commands and waiting for them to finish.

Atera’s Robin takes that routine work off your team’s plate. When Windows components appear damaged, Robin runs the supported system file repair workflow for the user and returns whether the corruption was fixed. Your technicians only step in for the cases that need them. Robin is sold separately as an add-on to the Atera IT suite.

» Take control of your Windows devices with a free trial of Atera or learn more about Robin

Was this helpful?

* Scripts are provided for your benefit. You understand and acknowledge that when downloading and/or copying and/or using the Scripts: (i) you may be exposed to Scripts from a variety of sources, (ii) Atera is not responsible and takes no liability for the accuracy, usefulness, integrity, lawfulness, title or infringement, security, functionality or Intellectual Property Rights of, or relating to, such Scripts; and (iii) the Scripts are provided “AS IS” and “AS AVAILABLE”, and may have errors, and may not be malware-free, and that your interactions with, and use of, the Scripts is at your sole risk and free will. You hereby agree to waive, and hereby do waive, any legal or equitable rights or remedies you may have against Atera with respect to the Scripts.

Related Articles

How to fix Microsoft Authenticator not working

Read now

How to fix a printer that is offline or not printing

Read now

How to clear the Teams cache

Read now

ServiceNow Teams integration: fixes in chat with Robin

Read now

Endless IT possibilities

Boost your productivity with Atera’s intuitive, centralized all-in-one platform