If your Windows 11 computer is experiencing issues like corrupted files, apps not opening, or system crashes, the DISM (Deployment Image Servicing and Management) tool can help you fix these problems. DISM is a built-in command-line utility that allows you to scan and repair Windows images, including Windows Recovery Environment, Windows Setup, and Windows PE (WinPE). This tool is particularly useful when the System File Checker (SFC) can't resolve certain issues.

In this guide, we'll explore how to use DISM commands to repair your Windows 11 system, whether you're fixing corrupted files, repairing the Windows image using PowerShell, or resolving DISM errors.

Run DISM Commands to Restore Corrupted Files

DISM scans your system for corrupted or missing files related to various Windows services. It then downloads the necessary images and files from the Microsoft servers to replace the corrupt ones. To use this feature, ensure your computer is connected to the internet.

Step 1: Open Command Prompt with administrative privileges. You can do this by searching for cmd in the Windows search, right-clicking on "Command Prompt," and selecting "Run as administrator."

Step 2: In the Command Prompt window, type the following command and press Enter to scan for file corruption:

DISM /Online /Cleanup-image /Scanhealth

The /ScanHealth option scans the system's component store for corruption and logs it in C:\Windows\Logs\CBS\CBS.log. Note that this command doesn't fix any issues; it only reports them.

Step 3: After the scan completes, check the health of the system image by entering the following command:

DISM /Online /Cleanup-Image /CheckHealth

The /CheckHealth option verifies whether any corruption has been detected by checking the error logs. This command will let you know if the image is healthy, repairable, or non-repairable.

The check process may take around 10-15 minutes. Once completed, you may receive one of the following messages:

  • No component store corruption detected – This means no corruption was found, and you don't need to take further action.
  • The component store is repairable – Corruption was detected, and you can proceed to repair it with the /RestoreHealth option.
  • The component store is not repairable – The corruption is severe, and you may need to restore Windows from a backup, reset, or reinstall Windows.

Step 4: If the component store is repairable, run the following command to repair the corrupted files:

DISM /Online /Cleanup-Image /RestoreHealth

The /RestoreHealth option scans for corruption and repairs the Windows image. This process can take 10-15 minutes or longer, depending on the extent of corruption.

Allow the process to complete without interruption. After it's finished, you should see a message indicating that the restore operation completed successfully. Restart your computer to apply the changes and verify if the issues are resolved.

If you want to view detailed logs of the DISM scan and repair, you can access them by navigating to the following paths in File Explorer:

C:\Windows\Logs\DISM\dism.log

or

C:\Windows\Logs\CBS\CBS.log

You can also open the Run dialog (press Windows + R) and enter one of the following commands to view the logs:

%windir%/Logs/CBS/CBS.log

or

%windir%\Logs\DISM\dism.log

If you receive the message "Windows Resource Protection detected corrupted files and successfully restored them," it means DISM found and fixed the corrupted files. Restart your PC to apply the repairs.

Repair Windows Image with PowerShell

You can also use Windows PowerShell to repair the Windows image, as it offers similar cmdlets to DISM. Here's how to do it:

Step 1: Launch PowerShell with administrative privileges. Search for "PowerShell" in the Windows search bar, right-click on "Windows PowerShell," and select "Run as administrator."

Step 2: To check the Windows component store for corruption, enter the following command and press Enter:

Repair-WindowsImage -Online –CheckHealth

This command quickly checks if any corruption exists in the system image but doesn't fix any issues.

If the scan report shows "ImageHealthState: Healthy," no errors were found in the component store.

Step 3: If the health state is "Repairable," you need to perform a more in-depth scan. Use the following command:

Repair-WindowsImage -Online –ScanHealth

This command scans for corruption and records the details in the log file located at C:\Windows\Logs\DISM\dism.log. It doesn't fix any issues.

Step 4: To repair the Windows image, run the following command:

Repair-WindowsImage -Online –RestoreHealth

This command checks for corruption and repairs any issues it finds.

If you don't have an internet connection, you can use the "Source" option with the install.wim or install.esd file to restore system components. Use the following command to specify the source:

Repair-WindowsImage -Online -RestoreHealth -Source G:\sources\install.wim:6 -LimitAccess

Replace G: with the drive letter where the Windows image file is located and :6 with the index number corresponding to your Windows version within the image file.

Repair Windows Image Using install.esd/.wim Image Offline

If you lack internet access or DISM cannot replace the damaged files, you can repair the Windows image using the install.wim or install.esd file from the Windows 11 installation media or ISO file.

Create Windows 11 Bootable USB Drive or Mount the Windows 11 ISO

Step 1: Download a fresh copy of Windows 11 using the Media Creation Tool. Visit the official Windows 11 download page and click the "Download now" button under the "Create Windows 11 Installation Media" section.

Step 2: Save the Media Creation Tool to a convenient location on your PC.

Step 3: Run the downloaded tool (MediaCreationToolW11.exe). If prompted by User Account Control, click "Yes."

Step 4: Accept the license terms by clicking "Accept."

Step 5: On the "Select language and edition" screen, you can either proceed with the recommended options or uncheck "Use the recommended options for this PC" to choose a different language or edition. Click "Next" when you're ready.

Step 6: Choose "USB flash drive" to create a bootable USB drive or "ISO file" if you prefer to create an ISO image that can be mounted later. Click "Next."

Step 7: If you selected "USB flash drive," insert a USB drive with at least 8 GB of storage, select it from the list, and click "Next."

The tool will create a Windows 11 installation media on your USB drive.

Repair Windows 11 Recovery Image Using install.esd/wim

Step 1: With the installation media ready, open Command Prompt with administrative privileges.

Step 2: Use the following command to repair the Windows 11 image:

DISM /Online /Cleanup-Image /RestoreHealth /Source:N:\Sources\install.esd

or

DISM /Online /Cleanup-Image /RestoreHealth /Source:N:\Sources\install.wim

Replace N: with the drive letter of the mounted ISO or USB installation media.

Step 3: To prevent DISM from contacting Windows Update during the repair, determine the index number of your Windows edition within the image file. Run the following command:

dism /get-wiminfo /wimfile:N:\sources\install.esd

or

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

Note the index number corresponding to your installed Windows edition.

Step 4: Run the following command to repair the image using the specific index number:

DISM /Online /Cleanup-Image /RestoreHealth /Source:esd:N:\Sources\install.esd:6 /LimitAccess

or

DISM /Online /Cleanup-Image /RestoreHealth /Source:wim:N:\Sources\install.wim:6 /LimitAccess

Replace 6 with the index number of your Windows edition. The /LimitAccess switch ensures DISM doesn't use Windows Update during the repair process.

Step 5: Wait for DISM to complete the repair. Once finished, restart your computer to apply the changes.

Using DISM to Install Windows Updates

If you're experiencing issues with Windows Update or need to install specific updates manually, you can use DISM to add Windows updates to your system.

Step 1: Visit the Microsoft Update Catalog and search for the update you need by entering the KB number (e.g., KB5014019) in the search field.

You can also search for "Windows 11" to see all available updates for the stable build.

Step 2: Locate the desired update from the list and click the "Download" button next to it.

Step 3: In the download window, click the provided link to download the update file (either a .cab or .msu file) and save it to a convenient location on your PC.

Adding a Windows Update Package to an Image

Step 1: Open Command Prompt with administrative privileges.

Step 2: Use the following command to add the downloaded update package to your running Windows installation:

Dism /Online /Add-Package /PackagePath:"C:\path\to\your\update.cab" /LogPath:C:\mount\dism.log

Replace C:\path\to\your\update.cab with the actual path and filename of the downloaded update.

Step 3: To verify that the update was installed, run the following command:

Dism /online /Get-Packages

This command lists all the packages installed on your system.

Remove Windows Updates Using the DISM Tool

If you need to uninstall a problematic Windows update, you can use DISM to remove it.

Step 1: Open Command Prompt with administrative privileges.

Step 2: Get a list of all installed packages and updates by running:

DISM /Online /get-packages /format:table

Step 3: Identify the package name of the update you want to remove from the "Package Identity" column.

Step 4: To get more details about a specific package, use:

DISM /online /get-packageinfo /packagename:PackageName

Replace PackageName with the actual package identity.

Step 5: Remove the update by executing:

DISM /Online /Remove-Package /PackageName:PackageName

Again, replace PackageName with the actual package identity.

Enable or Disable Windows Features Using DISM

DISM allows you to enable or disable Windows features on your system. Here's how:

Step 1: Open Command Prompt with administrative privileges.

Step 2: List all available Windows features by running:

DISM /online /Get-Features

Step 3: To get detailed information about a specific feature, use:

DISM /online /Get-FeatureInfo /FeatureName:FeatureName

Replace FeatureName with the name of the feature you're interested in.

Enable Windows 11 Features Using DISM

Step 1: To enable a feature, run:

DISM /online /Enable-Feature /FeatureName:FeatureName /All

For example, to enable the Telnet Client feature:

DISM /online /Enable-Feature /FeatureName:TelnetClient /All

Disable Windows 11 Features Using DISM

Step 1: To disable a feature, execute:

DISM /online /Disable-Feature /FeatureName:FeatureName

For example, to disable the Telnet Client feature:

DISM /online /Disable-Feature /FeatureName:TelnetClient

Remove Windows 11 Features Using DISM

Step 1: To remove a feature from the system, use the /Remove switch:

DISM /online /Disable-Feature /FeatureName:FeatureName /Remove

For example:

DISM /online /Disable-Feature /FeatureName:TelnetClient /Remove

DISM Failed Error on Windows 11

While using DISM, you might encounter various errors. Common issues include:

  • DISM failed no operation was performed – Often resolved by running DISM with the Windows 11 ISO file.
  • DISM failed with error codes like 0x8000ffff, 0x800f0954 – Usually occurs due to lack of internet access or disabled Windows Update service. Using a bootable USB or ISO image can help.
  • DISM failed while processing command cleanup-image – Can be fixed by cleaning up the system image components.

DISM Commands Not Working on Windows 11?

If DISM commands aren't working, you can try the following methods to resolve the issues.

Clean Up the Component Store

Corruption in the component store can cause DISM to fail. Cleaning up the component store can fix this.

Step 1: Analyze the component store by running:

DISM /Online /Cleanup-Image /AnalyzeComponentStore

Step 2: If the analysis recommends a cleanup, proceed by executing:

DISM /Online /Cleanup-Image /StartComponentCleanup

Run CHKDSK

Disk errors can interfere with DISM operations. Running the CHKDSK utility can help.

Step 1: Open Command Prompt with administrative privileges.

Step 2: Run the following command:

chkdsk /offlinescanandfix

You might be prompted to schedule the scan on the next restart. Type Y and press Enter, then restart your computer.

Reset Windows Update Service

DISM relies on the Windows Update service to download replacement files. If the service isn't working correctly, resetting it can help.

Step 1: Open Command Prompt with administrative privileges.

Step 2: Run the following commands one by one:

net stop wuauserv
cd %systemroot%\SoftwareDistribution
ren Download Download.old
net start wuauserv
net stop bits
net start bits
net stop cryptsvc
cd %systemroot%\system32
ren catroot2 catroot2old
net start cryptsvc

These commands restart the Windows Update service and rename certain folders to force the system to recreate them.

Disable Proxy Service

A proxy configuration can prevent DISM from connecting to the internet. Disabling the proxy may resolve the issue.

Step 1: Open Windows Settings by pressing Win + I.

Step 2: Navigate to "Network & internet" and click on "Proxy."

Step 3: Turn off all proxy settings under both "Automatic proxy setup" and "Manual proxy setup."

Changing the Startup Type of the Remote Procedure Call (RPC) Service

If you encounter a DISM failed 1726 error, it might be due to the RPC service being disabled. Here's how to fix it:

Step 1: Open the Run dialog by pressing Windows + R, type services.msc, and press Enter.

Step 2: In the Services window, find "Remote Procedure Call (RPC)" and double-click it.

Step 3: Set the "Startup type" to "Automatic," click "Apply," and then "OK."

Step 4: Restart your computer to apply the changes.


By following these methods, you should be able to effectively use DISM commands to repair and maintain your Windows 11 system. Regularly scanning and repairing your system can prevent many common issues and keep your PC running smoothly.