Table of contents
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.
- In an elevated PowerShell session, run
DISM /Online /Cleanup-Image /RestoreHealthand wait for The restore operation completed successfully - Run
sfc /scannowand let verification reach 100% - 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 | 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.
- 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 Run
sfc /scannowand leave the window open until verification reaches 100%
Read the final Windows Resource Protection line and match it to the table below

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
}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:
- Check for a pending servicing restart with
Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending" If it returns
True, arrange a restart with the user before going further
Check the Windows Modules Installer service with
Get-Service TrustedInstaller | Select-Object Status, StartType. Its normal startup type is Manual
- If the startup type is Disabled, set it back with
Set-Service -Name TrustedInstaller -StartupType Manual. You can also do this inservices.msc - Start the service with
Start-Service TrustedInstaller - Scan the system drive for file system errors with
chkdsk C: /scan. The scan runs online and doesn’t need a restart - 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 - If SFC still won’t run, restart the device into Safe Mode and run
sfc /scannowthere. This step needs the user or hands on the device As a last resort, boot into Windows Recovery Environment, open Command Prompt, and confirm the Windows drive letter with
diskpartandlist volume. Then runsfc /scannow /offbootdir=C:\ /offwindir=C:\Windows, replacingC: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.
- In an elevated Command Prompt, run
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%TEMP%\sfcdetails.txt" - Open the extract with
notepad "%TEMP%\sfcdetails.txt" - Search for Cannot repair member file and note each file and component it names
- 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:
Run
DISM /Online /Cleanup-Image /RestoreHealthand wait for The restore operation completed successfully. By default, DISM downloads replacement files from Windows Update
- Run
sfc /scannowand let it reach 100% - 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:
- Take ownership of the damaged file with
takeown /f <file> - Grant administrators full access with
icacls <file> /grant administrators:F - 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:
- Check the installed build with
Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" | Select-Object DisplayVersion, CurrentBuild, UBR, EditionID.UBRis the update revision, the number after the dot in the OS build - 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 Confirm the image file with
dir D:\sources\install.*. If the media holdsinstall.esdinstead ofinstall.wim, export the edition you need to a WIM withDISM /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 atC:\Temp\install.wim
List the editions in the image with
DISM /Get-WimInfo /WimFile:D:\sources\install.wimand note the index of the installed edition
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
- Run the repair against that source with
DISM /Online /Cleanup-Image /RestoreHealth /Source:WIM:D:\sources\install.wim:6 /LimitAccess./LimitAccessstops DISM from trying Windows Update or WSUS - Run
sfc /scannowagain
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.
If Windows still starts, open Settings > System > Recovery

Next to Advanced startup, select Restart now

From a remote session, run
reagentc /boottore, thenshutdown /r /t 0
- 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
On the Choose an option screen, select Troubleshoot

Select Advanced options

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

Run
diskpart, thenlist volume, to identify the Windows partition and the installation media. Drive letters in WinRE often differ from the ones Windows uses
- Type
exitto leave DiskPart, then confirm the Windows folder withdir C:\Windows, replacingC:with the letter you found - Run
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows - 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 - 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 - Run the offline SFC command from step 6 again
- 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.
- Mount the Windows 11 ISO or connect the installation media, run
setup.exe, and select Yes at the UAC prompt - Select Next and let Setup check for updates and compatibility
- When Setup shows what it will keep, select Change what to keep
Select Keep personal files and apps, then Next

- 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
- Select Install. The device restarts several times before it returns to the desktop
- 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 /scannowonce 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:
- Mount the ISO and note its drive letter with
(Mount-DiskImage -ImagePath "C:\ISO\Win11_x64.iso" -PassThru | Get-Volume).DriveLetter - Run a compatibility check without installing:
$p = Start-Process "D:\setup.exe" -ArgumentList "/auto upgrade /quiet /eula accept /compat scanonly" -Wait -PassThru - Read the result with
'{0:X}' -f $p.ExitCode.C1900210means no compatibility issues were found. Any other code means Setup found a blocker to resolve first - Start the repair with
Start-Process "D:\setup.exe" -ArgumentList "/auto upgrade /quiet /eula accept /noreboot /copylogs C:\Temp\SetupLogs"./auto upgradekeeps apps and data, and/norebootholds the first restart so you can schedule it with the user - 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
Related Articles
How to fix Microsoft Authenticator not working
Users can't sign in until Authenticator works again, and the wrong first move can lock them out completely. Here's how to find the real cause, on the phone or in Microsoft Entra, and fix it safely.
Read nowHow to fix a printer that is offline or not printing
An offline printer is rarely just one printer. The status Windows or macOS shows can come from a stuck job, a stale WSD port, a printer whose IP address moved, or a print server that has stopped for everyone. Find which one it is first, then fix only that, so a one-user problem doesn't turn into a restarted spooler for a whole office.
Read nowHow to clear the Teams cache
Clearing the Teams cache fixes a blank window, a client stuck loading, or stale data on one machine. It does nothing for missing messages or wrong unread counts, except wipe the logs that would explain them. New Teams also moved the cache, the process, and the reset path. Know which problem you have, then clear the right folder, as the right user, without ending anyone's meeting.
Read nowServiceNow Teams integration: fixes in chat with Robin
ServiceNow connects to Microsoft Teams four different ways, but none of them fix the issue. See how Robin resolves it in the chat.
Read nowEndless IT possibilities
Boost your productivity with Atera’s intuitive, centralized all-in-one platform
























