Fix: “SFC unable to fix corrupt files” in Windows 10 and 11
If you get the following error: “Windows Resource Protection found corrupt files but was unable to fix some of them. Details are included in the CBS.Log” when running the sfc /scannow command in Windows 10 or 11 then you can try the methods on this page to fix the problem.
But first:
System File Checker
System File Checker is a built-in Windows tool that you can use to scan and repair missing or corrupted system files.
If system files are missing or corrupted, then Windows may not behave as expected and some Windows functions may not work, or Windows may crash.
You can run this tool with the sfc /scannow
command in Windows Command Prompt (Admin).
DISM
The Deployment Image Servicing and Management (DISM) tool can fix component store corruption that prevents the System File Checker from working correctly.
We will use this tool to fix our System File Checker problem.
The “SFC unable to fix corrupt files” problem
I just reinstalled Windows 10, and after installing all of my software, I scanned Windows with the System File Checker tool.
But:
When I ran the sfc /scannow
command, I received the following error:
Windows Resource Protection found corrupt files but was unable to fix some of them. Details are included in the CBS.Log windir\Logs\CBS\CBS.log. For example C:\Windows\Logs\CBS\CBS.log. Note that logging is currently not supported in offline servicing scenarios.
Fortunately, I found a solution, and on this page, I will share it with you.
And now:
How to Fix “sfc found corrupt files but was unable to fix” in Windows 10 and 11
Method 1: DISM
1. Right-click on the Windows start menu button (or press the Windows + X keys) and then click on Command Prompt (Admin) or Terminal (Admin) (Windows 11).

You can also click on the Windows start menu button or search icon located in the taskbar > type cmd > right-click on Command Prompt > click on Run as administrator.


Or you press the Windows + R keys on your keyboard simultaneously to open a “Run” window > type cmd into the “Run” window > press the Ctrl + Shift + Enter keys on your keyboard simultaneously.


2. When the “User Account Control” window appears, you click Yes.
Note: Depending on your settings, you might need to enter your administrator password first and then click Yes.
3. In the Command Prompt or Terminal window, you type (or copy and paste) the following command:
DISM.exe /Online /Cleanup-image /Restorehealth

4. Press the Enter key on your keyboard.
Note:This process may take a few minutes to start and complete. At 99.9%, it may look like the proces is stuck (frozen), but that's normal. Don't worry about it. It will work. Just be patient and wait till the command is 100% complete.
5. After you see a message that says “The operation completed successfully”, you type the following command:
sfc /scannow

6. Press the Enter key on your keyboard.
Method 2: Start Windows in “Safe Mode”
1. Click on the Windows start menu button.

2. Click on the power button.

3. Hold the Shift key on your keyboard down and then click on Restart.

An options menu will appear.
4. Click on Troubleshoot.
5. Click on Advanced options.
6. Click on Startup Settings.
7. Click on Restart to restart your PC.
8. When the startup settings menu appears, you press the 5 key on your keyboard for Safe Mode with Networking.
9. Log into Windows.
10. Right-click on the Windows start menu button (or press the Windows + X keys) and then click on Command Prompt (Admin) or Terminal (Admin) (Windows 11).

You can also click on the Windows start menu button or search icon located in the taskbar > type cmd > right-click on Command Prompt > click on Run as administrator.


Or you press the Windows + R keys on your keyboard simultaneously to open a “Run” window > type cmd into the “Run” window > press the Ctrl + Shift + Enter keys on your keyboard simultaneously.


11. When the “User Account Control” window appears, you click Yes.
Note: Depending on your settings, you might need to enter your administrator password first and then click Yes.
12. In the Command Prompt or Terminal window, you type the following command:
sfc /scannow
6. Press the Enter on your keyboard.
Method 3: DISM and Windows ISO
Windows 10
1. Go to https://www.microsoft.com/en-us/software-download/windows10/.
2. Click on the Download tool now button.
3. Open the media creation tool.
4. Click on the Accept button.
5. Select Create installation media (USB flash drive, DVD, or ISO file) for another PC.
6. Click on Next.
7. Make sure that the correct language, edition, and architecture is selected.
8. Click on Next.
9. Select ISO file.
10. Click on Next.
11. Select a location on your PC where you want to save the Windows.iso file.
12. Click on the Save button.
The media creation tool will now download the Windows 10 iso file.
The download may take a while. The time it takes depends on your Internet connection (speed) and Microsoft's servers.
13. When the download is ready, you will need to unzip (extract) the ISO file with a file archiver program like 7-Zip, WinRar, or WinZip.
14. Open the sources folder of your unzipped (extracted) ISO file.
15. In the sources folder, you will find an install.wim file. Copy this file to your desktop.
16. Create a new folder on your desktop and name it mount.

17. Open Windows Command Prompt as administrator.
Three ways to open Windows Command Prompt as administrator:
- Press the Windows
+ X keyboard keys at the same time and then click on Command Prompt (Admin).
- Right-click on the start menu button and then click on Command Prompt (Admin).
- Enter cmd in the Windows search bar or Cortana, then right-click on Command Prompt and choose Run as administrator.
18. When the User Account Control (UAC) window appears, you click Yes.
Note: Depending on your settings, you might need to enter your administrator password first and then click Yes.
The Command Prompt window will appear.
Note: You must wait until a command is completed before you run the next command.
19. Type (or copy and paste) the following command:
Dism /mount-wim /wimFile:%USERPROFILE%\Desktop\install.wim /index:1 /MountDir:%USERPROFILE%\Desktop\mount

20. Press the Enter key on your keyboard.
21. Type (or copy and paste) the following command:
Dism /Online /Cleanup-Image /CheckHealth
22. Press the Enter key.
23. Type (or copy and paste) the following command:
Dism /Online /Cleanup-Image /RestoreHealth /Source:%USERPROFILE%\Desktop\mount\windows /LimitAccess
24. Press the Enter key.
This process may take 5 to 10 minutes. At 20%, it will look like the proces is stuck (frozen), but that's normal. Don't worry about it. It will work. Just be patient and wait till the command is 100% complete.
25. Type (or copy and paste) the following command:
Dism /unmount-wim /Mountdir:%USERPROFILE%\Desktop\mount /discard
26. Press the Enter key.
Note: when you're trying to unmount your wim image and you get an error like 0xc1420127, then try the following command:
Dism /cleanup-wim
27. Now it's time to re-run the sfc /scannow
command, so type (or copy and paste) the following command:
sfc /scannow

28. Press the Enter key.
Windows 11
1. Go to https://www.microsoft.com/software-download/windows11.
2. Scroll down to the “Download Windows 11 Disk Image (ISO)” section.
3. Click on the selection menu button that says “Select Download”.
4. Select Windows 11 (multi-edition ISO).
5. Click on the Download button.

6. Select the same product language as your current Windows.
7. Click on the Confirm button.

8. Click on the 64-bit Download button.

Your web browser will now download the Windows 11 ISO file.
9. When the download is complete, you'll need to unzip (extract) the ISO file with a file archiver program like 7-Zip (free and open source). To do so, right-click on the ISO file > Show more options > 7-Zip > Extract to “Win11_22H2_...” or Extract Here.


10. Open the sources folder of the unzipped (extracted) ISO file.

11. In the sources folder, you will find an install.wim file. Copy this file to your desktop.

12. Create a new folder on your desktop and name it mount.

13. Right-click on the Windows start menu button (or press the Windows + X keys) and then click on Command Prompt (Admin) or Terminal (Admin) (Windows 11).

You can also click on the Windows start menu button or search icon located in the taskbar > type cmd > right-click on Command Prompt > click on Run as administrator.


14. When the “User Account Control” window appears, you click Yes.
Note: Depending on your settings, you might need to enter your administrator password first and then click Yes.
It's important that you wait until a command is 100% complete before running the next command.
15. In the Command Prompt or Terminal window, you type (or copy and paste) the following command:
Dism /mount-wim /wimFile:%USERPROFILE%\Desktop\install.wim /index:1 /MountDir:%USERPROFILE%\Desktop\mount

16. Press the Enter key on your keyboard.
17. Wait till the command is complete.
18. Type (or copy and paste) the following command:
Dism /Online /Cleanup-Image /CheckHealth
19. Press the Enter key.
20. Wait till the command is complete.
21. Type (or copy and paste) the following command:
Dism /Online /Cleanup-Image /RestoreHealth /Source:%USERPROFILE%\Desktop\mount\windows /LimitAccess
22. Press the Enter key.
23. Wait till the command is complete.
This process may take 5 to 10 minutes. At 20%, it will look like the proces is stuck (frozen), but that's normal. Don't worry about it. It will work. Just be patient and wait till the command is 100% complete.
24. Type (or copy and paste) the following command:
Dism /unmount-wim /Mountdir:%USERPROFILE%\Desktop\mount /discard
25. Press the Enter key.
Note: when you're trying to unmount your wim image and you get an error like 0xc1420127, then try the following command:
Dism /cleanup-wim
26. Now it's time to re-run the sfc /scannow command, so type the following command:
sfc /scannow
27. Press the Enter key.
Related: