How to Repair Windows 11 with SFC and DISM Tools?

Posted by

Is your Windows 11 is not working correctly? Do you want to repair Windows 11? Windows 11 includes two built-in repair tools: SFC and DISM. SFC and DISM are two classic tools that help you restore corrupt system files. This gearupwindows article will guide you to repair your Windows 11 operating system without erasing any file or folder.

The sfc /scannow command checks the integrity of protected system files. If any file is corrupted or missing, SFC will replace it with correct versions when possible. This tool also detects if a file is overwritten with a modified or older version. In this case, SFC will retrieve the correct version of the file from the Windows Store and then replace the modified file. It is helpful when your PC is infected by malware or viruses. Using this SFC tool, you can quickly repair your Windows 11 OS.

On the other hand, DISM is another excellent tool that fixes Windows 11 problems quickly. DISM stands for Deployment Imaging and Servicing Management. If a Windows image becomes unserviceable, you can use this command to correct the problem.

How to Repair Windows 11 with SFC /SCANNOW Command?

You can use the sfc /scannow command on Windows 11 through any console, such as the classic command prompt, PowerShell, or Windows Terminal. If Windows 11 doesn’t start, you can boot with a command prompt. This tool does not require internet access that means you can scan your PC for corrupt files offline. Once the scan is completed, you can check the results in the CBS.LOG file (C:\Windows\Logs\CBS\CBS.log). You can open this log file using Notepad.

Step 1. Open the Windows Terminal as administrator.

To do that, press Windows + X keys from the keyboard or right-click on the Start button from the taskbar and then select Windows Terminal (Admin) from the available options.

Step 2. Select the Command Prompt or PowerShell from the down arrow chevron menu.

Step 3. Now, on the prompt, type the following command and then hit Enter from the keyboard to execute it:-

sfc /scannow

Step 4. Wait to complete the scan. The SFC tool may report that Windows Resource Protection did not find any integrity violations or found corrupt or broken files but was unable to fix some of them. If SFC does not find any problems, you can close the Windows Terminal console now.

If, after running the SFC command, Windows reports that “Windows Resource Protection found corrupt files but was unable to fix some of them,” try the following:-

Do a Component Store repair with the dism /Online /Cleanup-Image /RestoreHealth command (active internet is required)and then restart the computer. Now, try once more time with sfc /scannow.

How to Repair Windows 11 with DISM?

When the SFC tool fails to fix your OS, then the DISM tool plays a vital role. However, it needs an active internet connection. It will use the internet and retrieve the actual file version from Windows Update. DISM also allows you to use a local (offline) install.wim/install.esd file from an ISO file or bootable media with Windows 11. However, before doing the repair procedure, you much check the integrity of the Windows Component Store, i.e., to check its health.

How to Check the Health of Windows Component Store with DISM?

Step 1. Open Windows Terminal with administrative rights.

Step 2. If you prefer to use Windows Terminal as a command prompt, execute the command: dism /Online /Cleanup-Image /CheckHealth. On PowerShell prompt, you can use Repair-WindowsImage -Online -CheckHealth.

Using the above commands, you should see your PC health as healthy, repairable, or non-repairable.

Healthy – If DISM didn’t detect any component store corruption means no repair is required.

Repairable – If DISM finds a Component Store corruption, you need to repair it.

Non-repairable – If DISM reports as Non-repairable, that means Windows 11 can’t fix its Image Component Store. You can either repair, re-install or reset Windows 11.

How to Repair Windows 11 with DISM Tool using Windows Update?

Step 1. Open Windows Terminal as Administrator.

Step 2. If you prefer to use Windows Terminal as Command Prompt, then type the following command and hit Enter from the keyboard:-

dism /Online /Cleanup-Image /RestoreHealth


Those who prefer to use PowerShell can issue the following command:-

Repair-WindowsImage -Online -RestoreHealth

It may take several minutes, depending on the speed of your computer and the internet.

How to Repair Windows 11 with DISM using Install.wim or install.esd?

If you have an active Internet connection or want to use the DISM tool offline, you can make DIMS use install.wim or install.esd file as a source of the system files for the Windows Component Store.

Step 1. Mount Windows 11 ISO file or connect your bootable USB flash drive to PC.

Step 2. Note down the drive letter of the mounted virtual drive or USB stick, for instance, “I.”

Step 3. Now, open Windows Terminal as Administrator, and run the following command:-

dism /get-wiminfo /wimfile:I:\sources\install.wim

Note: In the above command line, replace the drive letter “I” with your drive letter when bootable Windows 11 is mounted. Also, replace the install.wim with the install.esd if your media includes an ESD file instead of WIM.

Step 4. Now, note down the index number from the output that matches your current operating system. The ISO which I am using has only one index that is for Windows 11 Pro. You may see more than one index on your Windows ISO file, so you need to note it down.

Step 5. Now, issue the following command in Command Prompt or PowerShell on Windows Terminal:-

dism /Online /Cleanup-Image /RestoreHealth /Source:wim:<Drive Letter>:\sources\install.wim:<Index Number> /limitaccess​

Note: Replace the values which you have noted down in the above steps. For my example, the command will be:-

dism /Online /Cleanup-Image /RestoreHealth /Source:wim:I:\sources\install.wim:1 /limitaccess

or issue the following command in PowerShell:-

Repair-WindowsImage -Online -RestoreHealth -Source "<Drive Letter>:\sources\install.wim:<Index>" -LimitAccess

Note: Replace the values which you have noted down in the above steps. For my example, the command will be:-

Repair-WindowsImage -Online -RestoreHealth -Source "I:\sources\install.wim:1" -LimitAccess

Now, wait till the process is completed.

Leave a Reply

Your email address will not be published. Required fields are marked *