How to Run SFC Scan in Windows?

It often happens that some Windows system files become corrupted, which can cause missing features, crashes, or other unexpected behavior. Windows includes a built-in tool called System File Checker (SFC) that scans protected system files and replaces corrupted versions with healthy copies.

How to Run a System File Checker (SFC) Scan

  1. Open Command Prompt, PowerShell, or Windows Terminal with administrator rights:
    • Windows 10/11: Right-click the Start menu and choose Windows Terminal (Admin) or Windows PowerShell (Admin). You can also search for cmd, right-click it, and select Run as administrator.
    • Older Windows versions: Right-click the Start menu and choose Command Prompt (Admin), or press Win + X and select the elevated Command Prompt option.

Fix: “You Must Be an Administrator Running a Console Session”

If you see the message “You must be an administrator running a console session in order to use the SFC utility”, it means the command window was opened in normal mode instead of elevated mode.

To fix it, close the current window, search for cmd, PowerShell, or Windows Terminal, then right-click it and choose Run as administrator. After that, run the SFC command again.

Tip: After searching for Command Prompt, you can press Ctrl + Shift + Enter to open it directly with administrator privileges.

  1. In the elevated command window, type the following command and press Enter:
    sfc /scannow

  2. Wait for the scan to finish. The result will appear after the verification reaches 100%.

How This Command Scans Your PC

System File Checker (SFC) scans protected Windows system files and checks whether critical files are corrupted, missing, or modified. This includes:

  • .dll libraries
  • .exe system executables
  • Core Windows configuration files
  • Other protected operating system components

If SFC finds a damaged file, it attempts to replace it automatically with a clean copy stored by Windows.

Older Windows versions used cached replacements from:

C:\Windows\System32\dllcache

In newer Windows versions, replacement files are taken from the Windows Component Store located at:

C:\Windows\WinSxS

After the scan completes, you may see one of the following results:

  • Windows Resource Protection did not find any integrity violations: No protected system files are corrupted.
  • Windows Resource Protection found corrupt files and successfully repaired them: SFC fixed the damaged files automatically.
  • Windows Resource Protection found corrupt files but was unable to fix some of them: Some files could not be repaired and require additional troubleshooting.

When SFC cannot repair all files, you can review the CBS log here:

%WinDir%\Logs\CBS\CBS.log

To extract only the SFC-related entries into a readable text file, run:

findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log > "%userprofile%\Desktop\sfcdetails.txt"

If the component store itself is damaged, run the following command first, then run sfc /scannow again:

DISM /Online /Cleanup-Image /RestoreHealth

After DISM finishes, open the sfcdetails.txt file from your desktop to review the entries related to files SFC checked or repaired.

ABOUT THE AUTHOR

Kamil Anwar


Kamil is a certified MCITP, CCNA (W), CCNA (S) and a former British Computer Society Member with over 9 years of experience Configuring, Deploying and Managing Switches, Firewalls and Domain Controllers also an old-school still active on FreeNode.

Comments

82
    KP
    Kevin Priest Nov 7, 2015

    Dism /Online /Cleanup-Image /RestoreHealth

    This did not work for me. It hangs for a minute or so at 20.0% and then I get the following…

    Error: 1726
    The remote procedure call failed

      KA
      K. Arrows Author Nov 7, 2015

      This seems to be caused by a running process on your system. Can you go to task manager; and kill all third party programs/processes? Then run it again.

        KP
        Kevin Priest Nov 7, 2015

        Unfortunately,after trying several different suggested fixes, including this one, I finally gave up and decided to try reinstalling Windows 10. So far everything seems to be working as it should with the re-install. I intend to keep a very close eye on things this time around to see if I can pinpoint what might have led to the issue the first time around. I will keep you updated if I find anything.

          KA
          K. Arrows Author Nov 7, 2015

          Thank you for letting me know. I do intend to write a detailed guide for this error and will do in a couple of days.

    HM
    Helpful Mum Nov 16, 2015

    I have just run this and got the following ‘Windows Resource Protection found corrupt files but was unable to fix some of them’

      KA
      K. Arrows Author Nov 16, 2015

      Please run this command. Dism /Online /Cleanup-Image /RestoreHealth

        HM
        Helpful Mum Nov 16, 2015

        Thank you.

    NV
    Nessie Visitacion Nov 20, 2015

    This is what appeared on my screen and I don’t know what to do next 🙁 ., I restart my pc thrice but this would still appear.

    NV
    Nessie Visitacion Nov 20, 2015

    This

      KA
      K. Arrows Author Nov 20, 2015

      Restart your computer.Then repeat the steps, that will fix it.

        NV
        Nessie Visitacion Nov 20, 2015

        I did like 10x now.. still comes back to bsod 🙁

        NV
        Nessie Visitacion Nov 20, 2015

        I dont know what to so with that repair pending coz yours directly started the verification

          KA
          K. Arrows Author Nov 20, 2015

          Can you upload the crash log to http://www.wikisend.com and share me the link.

          NV
          Nessie Visitacion Nov 20, 2015

          Thats the code error below..

          KA
          K. Arrows Author Nov 20, 2015

          Did you follow the steps here? http://appuals.com/best-fix-steps-fix-error-0xc000021a/ – Looks like an incompatible driver is causing this.

    J
    Johnathan Inman Jr. Dec 2, 2015

    Hey all, after running the scan, I get the message “Windows Resource Protection could not perform the requested operation.” Um… help please.

      KA
      K. Arrows Author Dec 2, 2015

      Reboot the system and then try.

    E
    Elodie H. Dec 13, 2015

    Hi,
    I tried to run the sfc scan, but it told me that I needed to reboot my system. I did but it still gives me the same message. What should I do?

      KA
      K. Arrows Author Dec 13, 2015

      What is the exact message you were having?

    NT
    Nicholas Theophilus Dec 22, 2015

    how do you know when the system restore is done

      KA
      K. Arrows Author Dec 22, 2015

      When it’s done, system will reboot and start normally. If it’s not done, you’ll get an error while it is restoring or trying to.

        NT
        Nicholas Theophilus Dec 22, 2015

        so an error like this is normal or… ?

          KA
          K. Arrows Author Dec 23, 2015

          Run sfc /scannow again to see what it says. And post a picture here, it will be better if we continue with this issue on http://equestions.net/ask so i can assist you more conveniently.

          NT
          Nicholas Theophilus Dec 28, 2015

          Sorry it took so long. school work
          It keeps asking to specify source, what do I do?

          KA
          K. Arrows Author Dec 28, 2015

          You need to mount an image of win 10 and point DISM to it. This is how

          If you get the error message “cannot find source files”you need to have an ISO file mounted and need to specify where it is located with the below command

          DISM /Online /Cleanup-Image /RestoreHealth /source:WIM:X:SourcesInstall.wim:1 /LimitAccess Where “X” is the drive letter where the ISO is located. Simply change the “X” to the correct drive letter

          NT
          Nicholas Theophilus Dec 29, 2015

          still keeps saying the same thing
          could be the fact that I haven’t activated windows yet

          KA
          K. Arrows Author Dec 29, 2015

          Please see my last response, you need to mount iso file and refer to the location as stated above. WIM:X:SourcesInstall.wim:1 /LimitAccess Where “X” is the drive letter where the ISO is located. Simply change the “X” to the correct drive letter

          NT
          Nicholas Theophilus Dec 29, 2015

          I think I did, you mean drive like c:

          KA
          K. Arrows Author Dec 29, 2015

          You need to create and burn windows 10 iso, mount it and then use it’s path in the command.

          NT
          Nicholas Theophilus Dec 30, 2015

          thanks, but is there a short guide I could use

          KA
          K. Arrows Author Dec 30, 2015

          There is showing how to mount; but you will need to download ISO for Windows 10 Media Creation Tool. http://appuals.com/how-to-mount-an-iso-file/

          NT
          Nicholas Theophilus Dec 29, 2015

          still keeps popping up the same message.
          could this be because I changed the accounts username some time back

    DO
    Dom Dec 27, 2015

    Mine says error 50 dism does not support servicing Windows per with the /online option

      KA
      K. Arrows Author Dec 27, 2015

      DISM.exe /Image:C: /Get-Packages

      instead of DISM.exe /Online /Get-Pacages

      /Online can only be used in windows not in the Windows Preinstallation Environment (WinPE)

      Reply
    SS
    STACEE STRACNER SEVERINO Dec 29, 2015

    MINE SAID Error: 87
    The online/cleanup-image/restorehealth option is unknown.
    For more information, refer to the help by running DISM.exe/?.
    The DISM log file can be found at C:WINDOWSLOGSDISMdism.log

    SS
    STACEE STRACNER SEVERINO Dec 29, 2015

    MINE SAID Error: 87

    The online/cleanup-image/restorehealth option is unknown.

    For more information, refer to the help by running DISM.exe/?.

    The DISM log file can be found at C:WINDOWSLOGSDISMdism.log

      KA
      K. Arrows Author Dec 29, 2015

      You entered the command incorrectly. Copy / Paste it from this article.

        TW
        Tyler Wang Feb 29, 2016

        I had the same error message. re-typed it correctly but still got the very same error message

          KA
          K. Arrows Author Feb 29, 2016

          What was the error message?

    BV
    Beth Vance Dec 29, 2015

    doing this fix allowed me to access google Chrome once more but did not solve the email issue.

      KA
      K. Arrows Author Dec 29, 2015

      The e-mail issue then must not be caused by the corruption of system files. It could be a different issue. I suggest you post complete details of it on equestions.net/ask

    JI
    James Brackley IV Jan 4, 2016

    My computer just said windows could not perform the requested operation. I
    Am dealing with start up error 0xc000021a

      KA
      K. Arrows Author Jan 4, 2016

      Please submit this as a new question on eQuestions.net/ask

        PH
        Patrick Hamilton Aug 12, 2016

        Mine said the same as James “Windows Resource Protection could not perform the requested operation.”

          KA
          K. Arrows Author Aug 12, 2016

          Run the following command:
          ICACLS C:Windowswinsxs
          Then see if you can get the sfc to work, if not then do a repair install. see steps here http://appuals.com/how-to-repair-install-windows-10-2/

    VD
    Vama Dev Mar 25, 2016

    hello. I’ve done all the steps above. i then restarted my pc and ran the scan again. it shows says “windows resource protection found corrupt files and successfully repaired them”. Does that mean the problem is solved?

      KA
      K. Arrows Author Mar 26, 2016

      Hopefully, if you don’t see issues.

    DD
    Divyank Diwakar Jun 5, 2016

    Sir this is appearing on my Windows 8
    I have tried all advance options but doesn’t work

      KA
      K. Arrows Author Jun 5, 2016

      choose advanced options and then do a system restore

    AN
    ArsenicDuck Nope Jul 15, 2016

    my computer is saying error 1639 the command-line is missing a required servicing command plz help

    AG
    Asmi Gandhi Mar 10, 2017

    Windows Resource Protection found corrupt files but was unable to fix some
    of them. Details are included in the
    .Log windirLogsCBSCBS.log. For
    example C:WindowsLogsCBSCBS.log. Note that logging is currently not
    supported in offline servicing scenarios.

    how to solve this

    AL
    ange lie Apr 5, 2017

    After scanning, it says WINDOWS RESOURCE PROTECTION COULD NOT PERFORM THE REQUESTED OPERATION. What will I do to fix my pc?

      KA
      K. Arrows Author Apr 6, 2017

      Run command prompt as administrator.

    PB
    Pooja Bagchi Jun 19, 2017

    Hi , i m trying to scan now by using command prompt but it says : you must be an administratorrunning a console session inorder to use the sfc utility……..

    now i highly confused, and donno wat to do ? PLz help me!

      KA
      K. Arrows Author Jun 23, 2017

      run command prompt as administrator

    AH
    Ashley Haas Jun 25, 2017

    “Windows Resource Protection could not perform the requested operation.”

    PK
    Peter Van Keuren Aug 7, 2017

    It seems that my computer has two completely different profiles, each totally unaware of the other. The older profile – PVK is the one currently up. My newer, and preferred profile is PRVK, which will no longer boot, and I don’t know how to get to it. For a couple of months now, on reboot, PVK would occasionally show up. Seeing that, I’d immediately shut down. It used to be that when I rebooted after that, PRVK would boot up, and all would be fine. As time went by, it took more reboots to get back into PRVK, until finally, at this time, only PVK will boot up, and in PVK, I’m missing 3 months of emails and the desktop is scrambled, with all of the icons bunched up on the left side of the screen, rather that my usual layout. I’ve tried everything that I can find to see both profiles, including regedit, hoping to be able to delete PVK and only boot into PRVK, but at this point, I can only find PVK. I’m lost on this one!

      MF
      MFJ Aug 10, 2017

      Hold Windows key and press R
      Type lusrmgr.msc and press Enter
      Double click Users
      Check
      if the PRVK is available there. If it is, right click and click
      Properties and make sure the option “Account is disabled” is unchecked

      Try this and let me know if ti solves the problem. If it doesn’t then let me know we will try something else

      Reply
    LS
    Lucien Sabbadini Aug 20, 2018

    Thanks for this help.
    L. S.

    SA
    Sarcastic871 Sep 19, 2018

    What if i don’t have admin privileges on my pc?

    SW
    Shane Warren Author Sep 22, 2019

    You need administrative privileges to run an SFC scan on your computer.

    DH
    David P Hagar Apr 15, 2020

    Back in the DOS days, I spent a lot of time at the command prompt; not so anymore.
    This help is great, but I have one suggestion. Perhaps this is obvious for many users, but I had some difficulty with the commands: e.g. “sfc /scannow”
    I did not notice the space between sfc and /scannow.
    After I did notice it, I recall that there should always be a space between the executable and options.My recommendation is to Copy&Paste the commands in your tutorials.

    MM
    ma. cristina medianesta Jul 24, 2020

    window resource protection could not start the repair
    what next

      SW
      Shane Warren Author Jul 26, 2020
    LM
    linda Motes Nov 4, 2020

    unknown error (H0084)
    how can I fix it?

      MZ
      Muhammad Zubyan Author Nov 6, 2020

      Can you confirm when exactly you are getting this error? and are you sure that the error code you gave me is correct or not?

    NE
    NeoPhore Mar 28, 2021

    after running the scan, its just stuck at “Verification 100% complete” I’ve waited for 10 minutes and even did it twice yet its still stuck. What do I do?

      MZ
      Muhammad Zubyan Author Mar 29, 2021

      Hey NeoPhone,

      It seems like your SFC scan is facing issues. You will have to repair your Windows and SFC using this command.

      DISM /Online /Cleanup-Image /RestoreHealth

      Once this command is executed successfully simply restart your computer and run the SFC command again. It should work properly this time. I hope this helps to resolve your issue let me know how it goes.

        TH
        TheBestPyro2505 Apr 14, 2021

        Hey Zubyan. I’m following this guide and I hit the same issue as NeoPhore. I’ve followed your instructions, but I’m still stuck on the “Verification 100% complete”

          MZ
          Muhammad Zubyan Author Apr 14, 2021

          If you have executed the DISM restore health command it said it repaired some files then you don’t have to run SFC Scan but can you tell me what lead you to run sfc command on the first place?

          TH
          TheBestPyro2505 Apr 14, 2021

          It started as task manager taking several minutes to open, then I noticed that administrative popups were also terribly slow to open. I’d try to update an app and it took upwards of ten minutes to get the confirmation popup. I figured there was a windows update I missed, so I checked and there apparently was. When I went to update, it just kept “checking for an update.” But at some point it told me there was an issue getting the update started. I ran a windows update troubleshoot and it said there was a problem running the troubleshoot itself. I didn’t know what to do after that, so I looked it up and somewhere (I think this website) told me to run this command. Still having the same issues.

          MZ
          Muhammad Zubyan Author Apr 14, 2021

          It seems like your Windows is affected by a virus in this case it looks like a worm to me. Even If your sfc scan works it’s not going to eliminate the virus. It’s highly recommended to do a scan through Malwarebytes or any other antivirus you have to stop the spreading of worm and after that do a reset of your Windows.

          TH
          TheBestPyro2505 Apr 14, 2021

          Yeah, I was hoping it wasn’t that, but thank you anyway. I’ll get right on it and tell you how it goes!

          TH
          TheBestPyro2505 Apr 15, 2021

          Hey Zubyan! I’ve followed your instructions and everything seems just fine now. Thank you very much!

    RK
    Rajiv k Jun 15, 2021

    My sfc scan result is showing Windows Resource Protection did not find any integrity violations. Does that mean there was no problem in my p c or it means it repaired it?

      MZ
      Muhammad Zubyan Author Jun 15, 2021

      It means that there is no problem found on your computer. However, if you still have doubts that there might be possible corruption exist on your computer you can always run a DISM Scan. Here is detailed guide on this topic:- https://appuals.com/use-dism-repair-windows-10/

    BH
    BhutanOP Nov 10, 2021

    my laptop screen still keeps turning off after i did the sfc scan 2 days ago and i did malwarebyte scan and i changed when the laptop screen can turn off to never. can anyone help? and also my laptop is windows 11 so i dont know if doing sfc scan still works on windows 11.

      MZ
      Muhammad Zubyan Author Nov 13, 2021

      I don’t think SFC will fix your screen turning off issue, does your screen also turn off when you are booting Windows?

    JS
    Jerry Smith Dec 3, 2023

    I’ve tried all of these to no avail. I have the Oxc000021a code and can’t get into anything after start up settings!

      MZ
      Muhammad Zubyan Author Jan 25, 2024

      https://appuals.com/0xc000021a-bsod-windows/

      ^ Try the solutions mentioned in this article.