Windows 10: Run SFC Command in Windows 10

Discus and support Run SFC Command in Windows 10 in Windows 10 Tutorials to solve the problem; How to: Run SFC Command in Windows 10 How to Repair System Files with SFC Command in Windows 10 The SFC command scans the integrity of all... Discussion in 'Windows 10 Tutorials' started by gregrocker, Dec 31, 2014.

  1. Run SFC Command in Windows 10


    How to: Run SFC Command in Windows 10

    How to Repair System Files with SFC Command in Windows 10


    The SFC command scans the integrity of all protected system files and replaces incorrect (corrupted or modified) versions with correct Microsoft versions.

    This tutorial will show you how to run the sfc command at boot or in Windows 10 to attempt to repair corrupted or modified system files.

    *tip If you get the Windows Resource Protection Could Not Start the Repair Service error when trying to run SFC, then make sure that the Windows Modules Installer service is enabled and set to Manual.

    *Warning System File Checker (SFC) incorrectly flags Windows Defender PowerShell module files as corrupted | Windows Support

    CONTENTS:
    • Option One: To Run SFC /SCANNOW Command at Boot
    • Option Two: To Run SFC /SCANFILE Command at Boot
    • Option Three: (recommended) To Run SFC /SCANNOW Command in Windows 10
    • Option Four: To Run SFC /SCANFILE Command in Windows 10
    • Option Five: (for log) To View Only the "SFC" Scan Results from the CBS.LOG




    OPTION ONE [/i] To Run SFC /SCANNOW Command at Boot

    *note This option scans the integrity of all Windows system files at boot (offline) and repairs files with problems (ex: corrupted or modified) when possible.

    Running SFC at boot will allow SFC to be able to repair files that are in use in Windows since SFC wouldn't be able to repair them in Windows.
    1. Open a command prompt at boot.

    2. In the command prompt, type diskpart and press Enter, then type list volume and press Enter. (see screenshot below step 3)

    3. Make note of the drive letters for your boot drive (ex: 350MB "System Reserved" partition) and Windows 10 drive, then type Exit and press Enter. (see screenshot below)

    *note If you do not have a "System Reserved" partition, and are not multi-booting with another operating system, then the boot drive and Windows 10 drive may be the same drive letter.

    Run SFC Command in Windows 10 [​IMG]

    4. In the command prompt, type the command below, and press Enter. (see screenshot below step 5)
    sfc /scannow /offbootdir=C:\ /offwindir=D:\windows

    *note You will need to substitute the C drive letter in the /offbootdir (offline boot directory) command part above with what step 3 shows of the partition/volume where your system boot files are stored (ex: "System Reserved" partition) instead.

    You will need to substitute the D drive letter in the /offwindir (offline windows directory) command part above with what step 3 shows as your Windows 10 partition/volume letter instead.

    5. When the scan is complete, hopefully you will see a Windows Resource Protection did not find any integrity violations message unlike below. (see screenshot below)

    *note You will see a blinking cursor at the prompt until finished. This will take a while to finish running though.

    Run SFC Command in Windows 10 [​IMG]

    6. If no issues were found, then close the command prompt, and restart the computer to start Windows 10.

    *note If SFC could not fix something, then run the command again to see if it may be able to the next time. Sometimes it may take running the sfc /scannow command up to 3 times with restarting the computer after each time to completely fix everything that it's able to.

    If not, then run the Dism /Online /Cleanup-Image /RestoreHealth (requires Internet connection) command to repair any component store corruption, restart the PC afterwards, and try the sfc /scannow command again.

    If still not, then do a system restore using a restore point dated before the bad system file occurred to fix it. You may need to repeat doing a system restore until you find a older restore point that may work.

    If still not, then you could do a repair install without losing anything.

    If still not, then you could refresh Windows 10.

    When running SFC offline (at boot), SFC logging in the CBS.log file is not supported to be able to create a sfcdetails.txt file in OPTION FIVE below.






    OPTION TWO [/i] To Run SFC /SCANFILE Command at Boot

    *note This option scans the integrity of a specified Windows system file at boot (offline) and repairs the file if it has problems (ex: corrupted or modified) when possible.

    Running SFC at boot will allow SFC to be able to repair the file if it was in use in Windows since SFC wouldn't be able to repair the file in Windows.
    1. Open a command prompt at boot.

    2. In the command prompt, type diskpart and press Enter, then type list volume and press Enter. (see screenshot below step 3)

    3. Make note of the drive letters for your boot drive (ex: 350MB "System Reserved" partition) and Windows 10 drive, then type Exit and press Enter. (see screenshot below)

    *note If you do not have a "System Reserved" partition, and are not multi-booting with another operating system, then the boot drive and Windows 10 drive may be the same drive letter.

    Run SFC Command in Windows 10 [​IMG]

    4. In the command prompt, type the command below, and press Enter. (see screenshot below step 5)
    sfc /scanfile="full path of file" /offbootdir=C:\ /offwindir=D:\windows

    *note You will need to substitute full path of file in the command above with the actual full path of the Windows system file you want to scan. The drive letter will be the same as is shows in step 3 above for your Windows 10 partition/volume letter (ex: D)
    For example: "D:\Windows\System32\imageres.dll"
    You will need to substitute the C drive letter in the /offbootdir (offline boot directory) command part above with what step 3 shows of the partition/volume where your system boot files are stored (ex: "System Reserved" partition) instead.

    You will need to substitute the D drive letter in the /offwindir (offline windows directory) command part above with what step 3 shows as your Windows 10 partition/volume letter instead.

    5. When the scan is complete, hopefully you will see a Windows Resource Protection did not find any integrity violations message like below. (see screenshot below)

    Run SFC Command in Windows 10 [​IMG]

    6. If no issues were found, then close the command prompt, and restart the computer to start Windows 10.

    *note If SFC could not fix something, then run the command again to see if it may be able to the next time. Sometimes it may take running the sfc /scannow command up to 3 times with restarting the computer after each time to completely fix everything that it's able to.

    If not, then run the Dism /Online /Cleanup-Image /RestoreHealth (requires Internet connection) command to repair any component store corruption, restart the PC afterwards, and try the sfc /scannow command again.

    If still not, then you could system restore using a restore point dated before the bad system file occured to fix it. You may need to repeat doing a system restore until you find a older restore point that may work.

    When running SFC offline (at boot), SFC logging in the CBS.log file is not supported to be able to create a sfcdetails.txt file in OPTION FIVE below.






    OPTION THREE [/i] To Run SFC /SCANNOW Command in Windows 10

    *note This option scans the integrity of all system files and repairs files with problems (ex: corrupted or modified) when possible.
    1. Open an elevated Windows PowerShell.

    2. In the elevated command prompt, type the command below, and press Enter. (see screenshots below step 3)
    sfc /scannow
    3. When the scan is complete, hopefully you will see a Windows Resource Protection did not find any integrity violations message unlike below. (see screenshot below)

    *note You will see a blinking cursor at the prompt until finished. This will take a while to finish running though.

    Run SFC Command in Windows 10 [​IMG]

    Run SFC Command in Windows 10 [​IMG]

    4. If not issues were found, then close the command prompt.

    *note If SFC could not fix something, then run the command again to see if it may be able to the next time. Sometimes it may take running the sfc /scannow command up to 3 times with restarting the computer after each time to completely fix everything that it's able to.

    If not, then run the Dism /Online /Cleanup-Image /RestoreHealth (requires Internet connection) command to repair any component store corruption, restart the PC afterwards, and try the sfc /scannow command again.

    If still not, then do a system restore using a restore point dated before the bad system file occurred to fix it. You may need to repeat doing a system restore until you find a older restore point that may work.

    If still not, and you would like to get help with your SFC issue before continuing with more drastic measure below, then you could OPTION FIVE below in a reply post in this tutorial.

    If still not, then you could do a repair install without losing anything.

    If still not, then you could refresh Windows 10.






    OPTION FOUR [/i] To Run SFC /SCANFILE Command in Windows 10

    *note This option scans the integrity of a specified Windows system file and repairs the file if it has problems (ex: corrupted or modified) when possible.
    1. Open an elevated Windows PowerShell.

    2. In the elevated command prompt, type the command below, and press Enter. (see screenshot below step 3)
    sfc /scanfile="full path of file"

    *note You will need to substitute full path of file in the command above with the actual full path of the Windows system file you want to scan.
    For example: sfc /scanfile="C:\Windows\System32\imageres.dll"

    3. When the scan is complete, hopefully you will see a Windows Resource Protection did not find any integrity violations message like below. (see screenshot below)

    Run SFC Command in Windows 10 [​IMG]

    4. If no issues were found, then close the command prompt.

    *note If SFC could not fix something, then run the command again to see if it may be able to the next time. Sometimes it may take running the sfc /scannow command up to 3 times with restarting the computer after each time to completely fix everything that it's able to.

    If not, then run the Dism /Online /Cleanup-Image /RestoreHealth (requires Internet connection) command to repair any component store corruption, restart the PC afterwards, and try the sfc /scannow command again.

    If still not, then do a system restore using a restore point dated before the bad system file occurred to fix it. You may need to repeat doing a system restore until you find a older restore point that may work.

    If still not, and you would like to get help with your SFC issue before continuing with more drastic measure below, then you could OPTION FIVE below in a reply post in this tutorial.

    If still not, then you could do a repair install without losing anything.

    If still not, then you could refresh Windows 10.






    OPTION FIVE [/i] To View Only the "SFC" Scan Results from the CBS.LOG

    *note When SFC runs in Windows, it logs it's actions into the C:\Windows\Logs\CBS\CBS.log file. The steps in this option will show you how to see only the specific SFC entries with the [SR] tags in this CBS.log to not have to see all the other unrelated entries in the CBS.log.

    When running SFC offline (at boot) in OPTION ONE or OPTION TWO, SFC logging in the CBS.log file is not supported to be able to create a sfcdetails.txt file.
    1. Open an elevated Windows PowerShell.

    2. In the elevated command prompt or PowerShell, copy and paste the appropriate command below, and press Enter. (see screenshot below step 3)
    Only for elevated command prompt:
    Code:
    Only for elevated PowerShell:
    Code:
    Run SFC Command in Windows 10 [​IMG]

    3. Close the elevated command prompt.

    4. Open the sfcdetails.txt file on your desktop to only see the SFC scan details from the CBS.LOG file.

    5. When finished, you can safely delete the sfcdetails.txt file afterwards if you like.

    That's it,
    Shawn


    Related Tutorials

    :)
     
    gregrocker, Dec 31, 2014
    #1
  2. Dani Pun Win User

    I think I found the error to my computer's freezing, can anybody help with this?

    Please proceed in doing the following troubleshooting steps.

    Run the System File Checker (SFC):

    • Press Windows key + R to run Command Prompt.
    • Enter sfc /scannow.
    If SFC doesn't work, run DSIM command on your Windows 10:

    • Press Windows key + R to run Command Prompt.
    • Enter DISM /Online /Cleanup-Image /RestoreHealth
    Allow the command to finish before closing the Command Prompt window. It may take a few minutes for this command to finish. If DSIM command changed anything, restart your computer and then run SFC command again.

    Let us know how it goes.
     
    Dani Pun, Dec 31, 2014
    #2
  3. SFC: Windows Resource Protection could not perform the requested operation at 36% with no [SR] error tags and no errors in chkdsk nor any in DISM

    I guess, try SFC at the Command Prompt of the recovery environment (before Windows has booted).

    Run SFC Command in Windows 10

    How to run SFC command in Windows 10

    (1) Hold Shift, & click Restart.

    This reboots to the recovery environment.

    (2) Click "Troubleshoot > Advanced Options > Command Prompt".

    A DOS box opens.

    (3) Run the offline SFC as described in Option One of the article.

    (I'm unsure OffBootDir really matters - but do get OffWinDir right.)

    (4) Type exit or click the X of the Command Prompt to exit back to the recovery environment.

    (5) Click Continue to return to Windows.

    Good luck, & keep us informed.

    Edit: It won't hurt to run the DISM command in Windows first as that is a prep for SFC. Also, the article does say...

    "When running SFC offline (at boot), SFC logging in the CBS.log file is not supported to be able to create a sfcdetails.txt file in
    OPTION FIVE below."
     
    PCR Just PCR, Dec 31, 2014
    #3
  4. Brink
    Brink New Member

    Run SFC Command in Windows 10

    Hey Greg,

    It's been my experience that SFC will always find unrepairable files in Windows 10. I suspect that it's because it's still only a preview build and have many patched system files still.

    Do you have a restore point available dated before the DISM error?
     
    Brink, Dec 31, 2014
    #4
  5. No Restore Points queued even though I apportioned 10% disk space.

    was actually doing more repair than I usually have patience for before reinstalling (for practice) but now that you tell me that I'll cut to the reinstall. I did run the CBS log by Noel to see what he says, if he has time for it without being able to extract just the SFC log.

    Thanks and Happy New Year~!
     
    gregrocker, Jan 1, 2015
    #5
  6. Vladimir Win User
    I'm experiencing the same issue. SFC /scannow always stops at 2%. I hope that MS fix it in build 100xx !

    *Smile
     
    Vladimir, Feb 23, 2015
    #6
  7. eagle Win User
    Thanks Brink another great tutorial!
    Sfc /scannow would not complete - after running the Dism /Online /Cleanup-Image /RestoreHealth the sfc /scannow worked and fully completed, also worked on Windows 8.1.

    Microsoft Windows [Version 6.3.9600]
    (c) 2013 Microsoft Corporation. All rights reserved.
    C:\WINDOWS\system32>Dism /online /cleanup-image /restorehealth
    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17031
    Image Version: 6.3.9600.17031
    [==========================100.0%==========================]
    The restore operation completed successfully. The component store corruption was
    repaired.
    The operation completed successfully.
    C:\WINDOWS\system32>sfc /scannow
    Beginning system scan. This process will take some time.
    Beginning verification phase of system scan.
    Verification 100% complete.
    Windows Resource Protection did not find any integrity violations.
    C:\WINDOWS\system32>
     
    eagle, Apr 17, 2015
    #7
  8. Run SFC Command in Windows 10

    i ran SFC /scannow my result came like this "windows resource protection found corrupt files but was unable to fix some of them " is this was ok or something went wrong??
     
    remostalin, Jul 20, 2015
    #8
  9. Brink
    Brink New Member
    Hello Remostalin,

    That means that SFC was unable to repairs some of your system files that were found to be corrupted or modified.

    If you like, see if doing what's in the note box under OPTION THREE may allow SFC to be able to repair them afterwards.

    If it still cannot, then you could perform OPTION FIVE to get your sfcdetails.txt log and upload it here. I'll be happy to take a look to see and let you know what SFC was unable to repair, and what we may be able to do from there. *Smile
     
    Brink, Jul 20, 2015
    #9
  10. TinyUpload
     
    remostalin, Jul 20, 2015
    #10
  11. Brink
    Brink New Member
    Luckily, it's just part of the false hash mismatch for the MicrosoftEdgeSquare44x44.scale-125_contrast-white.png file from the KB3074667 update.

    There's nothing that needs to be done or to worry about it. *Smile
     
    Brink, Jul 20, 2015
    #11
  12. oh thanks a lot *Biggrin
     
    remostalin, Jul 21, 2015
    #12
  13. Brink
    Brink New Member

    Run SFC Command in Windows 10

    You're most welcome. *Smile
     
    Brink, Jul 21, 2015
    #13
  14. slobodan Win User
    Checked the faulty file, it is zero-filled, definitely an error (write error?). Get the proper file from http://members.ziggo.nl//Mic...rast-white.png , replace it in its WinSxS repository ( amd64_microsoft-windows-microsoftedge_31bf3856ad364e35_10.0.10240.16397_none_19381f0c8accd5dd ) and do again sfc /scannow.
     
    slobodan, Jul 28, 2015
    #14
  15. Please help. Sorry to hijack your thread but this is what sfcdetails shows after eight scans:

    2015-07-31 12:43:34, Info CSI 00001b9a [SR] Cannot repair member file [l:14{7}]"App.xbf" of Microsoft-Windows-ParentalControls.AppxMain, Version = 10.0.10240.16384, pA = amd64, nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35} in the store, hash mismatch
    2015-07-31 12:43:37, Info CSI 00001c0d [SR] Cannot repair member file [l:14{7}]"App.xbf" of Microsoft-Windows-ParentalControls.AppxMain, Version = 10.0.10240.16384, pA = amd64, nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35} in the store, hash mismatch
    2015-07-31 12:50:09, Info CSI 00004cc6 [SR] Cannot repair member file [l:14{7}]"App.xbf" of Microsoft-Windows-ParentalControls.AppxMain, Version = 10.0.10240.16384, pA = amd64, nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35} in the store, hash mismatch
    2015-07-31 12:50:09, Info CSI 00004cc9 [SR] Cannot repair member file [l:14{7}]"App.xbf" of Microsoft-Windows-ParentalControls.AppxMain, Version = 10.0.10240.16384, pA = amd64, nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35} in the store, hash mismatch
    2015-07-31 12:59:47, Info CSI 00001b9d [SR] Cannot repair member file [l:14{7}]"App.xbf" of Microsoft-Windows-ParentalControls.AppxMain, Version = 10.0.10240.16384, pA = amd64, nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35} in the store, hash mismatch
    2015-07-31 12:59:50, Info CSI 00001c10 [SR] Cannot repair member file [l:14{7}]"App.xbf" of Microsoft-Windows-ParentalControls.AppxMain, Version = 10.0.10240.16384, pA = amd64, nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35} in the store, hash mismatch
    2015-07-31 13:06:05, Info CSI 00004cc7 [SR] Cannot repair member file [l:14{7}]"App.xbf" of Microsoft-Windows-ParentalControls.AppxMain, Version = 10.0.10240.16384, pA = amd64, nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35} in the store, hash mismatch
    2015-07-31 13:06:05, Info CSI 00004cca [SR] Cannot repair member file [l:14{7}]"App.xbf" of Microsoft-Windows-ParentalControls.AppxMain, Version = 10.0.10240.16384, pA = amd64, nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35} in the store, hash mismatch

    I only altered this registry to allow Microsoft Money 2005 to work, after internet search.
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer]
    "Version"="9.11.10240.0" (originaly: 9.11.10240.16384)
    Any ideas?
     
    ricequeen4u, Jul 30, 2015
    #15
Thema:

Run SFC Command in Windows 10

Loading...
  1. Run SFC Command in Windows 10 - Similar Threads - Run SFC Command

  2. Sfc/ scannow command

    in AntiVirus, Firewalls and System Security
    Sfc/ scannow command: After how many days the sfc / scannow command should be given? https://answers.microsoft.com/en-us/windows/forum/all/sfc-scannow-command/f79dacdc-d025-4a65-b558-fac623daa355
  3. Sfc/ scannow command

    in Windows 10 Software and Apps
    Sfc/ scannow command: After how many days the sfc / scannow command should be given? https://answers.microsoft.com/en-us/windows/forum/all/sfc-scannow-command/f79dacdc-d025-4a65-b558-fac623daa355
  4. Encountering errors while running sfc /scannow command

    in Windows 10 Gaming
    Encountering errors while running sfc /scannow command: Hello,When I run sfc /scannow command, it showing me that 'sfc scannow finds some corrupted files but unable to fix them'. When I checked CBS logs, I found these error messages-1. DEPLOY [Pnp] Failed repairing file: C:\WINDOWS\System32\drivers\vmbusr.sys:...
  5. Encountering errors while running sfc /scannow command

    in Windows 10 Software and Apps
    Encountering errors while running sfc /scannow command: Hello,When I run sfc /scannow command, it showing me that 'sfc scannow finds some corrupted files but unable to fix them'. When I checked CBS logs, I found these error messages-1. DEPLOY [Pnp] Failed repairing file: C:\WINDOWS\System32\drivers\vmbusr.sys:...
  6. sfc command not working

    in Windows 10 Gaming
    sfc command not working: hello guys , i just tried to run sfc/scannow in cmd in Administrator and its not working and its say : 'sfc' is not recognized as an internal or external command,operable program or batch file.i don't know what i am did wrong , and i want just ask how can i know if i have...
  7. sfc command not working

    in Windows 10 Software and Apps
    sfc command not working: hello guys , i just tried to run sfc/scannow in cmd in Administrator and its not working and its say : 'sfc' is not recognized as an internal or external command,operable program or batch file.i don't know what i am did wrong , and i want just ask how can i know if i have...
  8. sfc command not working

    in Windows 10 BSOD Crashes and Debugging
    sfc command not working: hello guys , i just tried to run sfc/scannow in cmd in Administrator and its not working and its say : 'sfc' is not recognized as an internal or external command,operable program or batch file.i don't know what i am did wrong , and i want just ask how can i know if i have...
  9. Possible to run SFC command from bootable media?

    in Windows 10 Ask Insider
    Possible to run SFC command from bootable media?: I can never get this to work but I'm not sure if it's even possible from the recovery environment or attached as an external drive to a working machine. I use my Windows 10 21H2 bootable USB to load the device into a recovery environment. Then I go into Diskpart and assign a...
  10. Running the SFC and DISM commands

    in Windows 10 BSOD Crashes and Debugging
    Running the SFC and DISM commands: The picture below shows how I run the sfc & dism cmds --- sfc should be run before & after the dism cmd --- [IMG] It works for me. https://answers.microsoft.com/en-us/windows/forum/windows_10-performance/running-the-sfc-and-dism-commands/3d325608-c97d-401a-8cbf-9d0a7f499bcb

Users found this page by searching for:

  1. Run sfc /