Команды dism для windows 11

Для проверки целостности системных файлов и восстановления поврежденных файлов (библиотек) компонентов в Windows (Windows Server) можно использовать команды SFC и DISM. Эти две утилиты могут быть крайне полезными, если операционная система Windows работает нестабильно, появляются ошибки при запуске стандартных приложений или служб, после вирусного заражения и т.д.

В этой статье мы рассмотрим, как использовать команды
sfc /scannow
,
DISM /Online /Cleanup-Image /RestoreHealth
или
Repair-WindowsImage -Online -RestoreHealth
для восстановления образа и системных фалов в Windows 10/11 и Windows Server 2022/2019/2016.

Содержание:

  • SFC /scannow: восстановление системных файлов Windows
  • Проверка целостности хранилища компонентов Windows с помощью DISM
  • Восстановление образа Windows с помощью DISM /RestoreHealth
  • DISM /Source: восстановление образа Windows с установочного диска
  • Восстановление образа Windows с помощью PowerShell
  • DISM: восстановление поврежденного хранилища компонентов, если Windows не загружается

SFC /scannow: восстановление системных файлов Windows

Перед тем, как восстанавливать образ Windows с помощью DISM, рекомендуется сначала попробовать проверить целостность системных файлов с помощью утилиты SFC (System File Checker). Команда
sfc /scannow
позволяет проверить целостность системных файлов Windows. Если какие-то системные файлы отсутствуют или повреждены, утилита SFC попробует восстановить их оригинальные копии из хранилища системных компонентов Windows (каталог C:\Windows\WinSxS).

Утилита SFC записывает все свои действия в лог-файл
windir%\logs\cbs\cbs.log
. Для всех записей, оставленных SFC в файле CBS.log проставлен тег [SR]. Чтобы выбрать из лога только записи, относящиеся к SFC, выполните команду:

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

Если команда sfc /scannow возвращает ошибку “
Программа защиты ресурсов Windows обнаружила повреждённые файлы, но не может восстановить некоторые из них / Windows Resource Protection found corrupt files but was unable to fix some of them
”, скорее всего утилита не смогла получить необходимые файла из хранилища компонентов (образа) Windows.

sfc /scannow Программа защиты ресурсов Windows обнаружила повреждённые файлы, но не может восстановить некоторые из них

В этом случае вам нужно попробовать восстановить хранилище компонентов вашего образа Windows с помощью DISM.

После восстановления образа вы можете повторно использовать утилиту SFC для восстановления системных файлов.

Проверка целостности хранилища компонентов Windows с помощью DISM

Утилита DISM (Deployment Image Servicing and Management) доступна во всех версиях Windows, начиная с Vista.

Для сканирования образа Windows на наличие ошибок и их исправления используется параметр DISM /Cleanup-image. Команды DISM нужно запускать из командной строки, с правами администратора.

Чтобы проверить наличие признака повреждения хранилища компонентов в образе Windows (флаг CBS), выполните команду (не применимо к Windows 7/Server 2008R2):

DISM /Online /Cleanup-Image /CheckHealth

Эта команда не выполняет полное сканирование хранилища компонентов. Проверяются лишь записанные ранее маркеры повреждений и события в журнале Windows. Изменения в образ не вносятся. Команда проверит, не помечен ли ваш образ Windows как поврежденный и возможно ли исправить его.

DISM /CheckHealth - проверка повреждений в образе windows

В этом примере команда вернула, что с образом все хорошо:

No component store corruption detected.
The operation completed successfully.

Чтобы выполнить полное сканирование хранилища компонентов на наличие повреждений в хранилище компонентов Windows, запустите команду:

DISM /Online /Cleanup-Image /ScanHealth

Команда проверки образа Windows может выполняться довольно долго (от 10 до 30 минут). И вернет один из трех результатов:

  • No component store corruption detected – DISM не обнаружил повреждения в хранилище компонентов;
  • The component store is repairable – DISM обнаружил ошибки в хранилище компонентов и может исправить их;
  • The component store is not repairable – DISM не может исправить хранилище компонентов Windows (попробуйте использовать более новую версию DISM или вам придется восстанавливать образ Windows из резервной копии, сбрасывать или полностью переустанавливать вашу копию Windows.

DISM Cleanup-Image ScanHealth проверить хранилище компонентов Windows, хранилище компонентов можно исправить

В Windows 7 и Windows Server 2008 R2 для использования параметра DISM /ScanHealth нужно установить отдельное обновление KB2966583. Иначе при запуске DISM будет появляться “
Ошибка 87. Параметр ScanHealth не распознан в этом контексте
”.

Команда DISM /ScanHealth может вернуть ошибки:

  • Ошибка: 1726. Сбой при удалённом вызове процедуры;
  • Ошибка: 1910. Не найден указанный источник экспорта объекта.

Это однозначно говорит о том, что ваш образ Windows поврежден и его нужно восстановить.

Восстановление образа Windows с помощью DISM /RestoreHealth

Чтобы исправить повреждения в хранилище компонентов образа Windows нужно использовать опцию RestoreHealth команды DISM. Эта опция позволит исправить найденные в образе ошибки, автоматически скачать и заменить файлы повреждённых или отсутствующих компонентов эталонными версиями файлов из центра обновлений Windows (на компьютере должен быть доступ в Интернет). Выполните команду:

DISM /Online /Cleanup-Image /RestoreHealth

В Windows 7/2008 R2 эта команда выглядит по другому:
DISM.exe /Online /Cleanup-Image /ScanHealth

Процесс сканирования и восстановления компонентов может быть довольно длительным (30 минут или более). DISM автоматически загрузит недостающие или поврежденные файлы образа с серверов Windows Update.

Восстановление выполнено успешно. Операция успешно завершена.
The restore operation completed successfully.

DISM /Online /Cleanup-Image /RestoreHealth - восстановление образа windows 10

DISM /Source: восстановление образа Windows с установочного диска

Если на компьютере (сервере) отсутствует доступ в Интернет или отключена/повреждена служба Windows Update (как восстановить клиент Windows Update), то при восстановлении хранилища компонентов появятся ошибки:

  • 0x800f0906 — Не удалось скачать исходные файлы. Укажите расположение файлов, необходимых для восстановления компонента, с помощью параметра Источник (0x800f0906 — The source files could not be downloaded. Use the source option to specify the location of the files that are required to restore the feature);
  • Ошибка: 0x800f0950 — Сбой DISM. Операция не выполнена (0x800f0950 — DISM failed. No operation was performed);
  • Ошибка:0x800F081F. Не удалось найти исходные файлы. Укажите расположение файлов, необходимых для восстановления компонента, с помощью параметра Источник (Error 0x800f081f, The source files could not be found. Use the «Source» option to specify the location of the files that are required to restore the feature).

DISM /RestoreHealth Error 0x800f081f, The source files could not be found

<

Во всех этих случаях вы можете использовать альтернативные средства получения оригинальных файлов хранилища компонентов. Это может быть:

  • Установочный диск/флешка/iso образ Windows
  • Смонтированный файл wim
  • Папка \sources\SxS с установочного диска
  • Файл install.wim с установочным образом Windows

Вы можете указать WIM или ESD файл с оригинальным установочным образом Windows, который нужно использовать в качестве источника для восстановления файлов системы. Предположим, вы смонтировали установочный ISO образ Windows 11 в виртуальный привод D:.

Примечание. Для восстановления поврежденных файлов в хранилище компонентов из локального источника версия и редакция Windows в образе должна полностью совпадать с вашей.

С помощью следующей PowerShell команды проверьте, какая версия Windows установлена на вашем компьютере:

Get-ComputerInfo |select WindowsProductName,WindowsEditionId,WindowsVersion, OSDisplayVersion

powershell Get-ComputerInfo получить номер билда и редакцию windows

Выведите список доступных версий Windows в установочном образе:

Get-WindowsImage -ImagePath "D:\sources\install.wim"

В нашем случае образ Windows 11 Pro в образе install.wim имеет
ImageIndex = 6
.

Для восстановления хранилища компонентов из локального WIM/ESD файла с блокированием доступа в интернет, выполните следующую команду (не забудьте указать ваш индекс версии Windows в файле):

DISM /online /cleanup-image /restorehealth /source:WIM:D:\sources\install.wim:6  /limitaccess

Или:
DISM /online /cleanup-image /restorehealth /source:ESD:D:\sources\install.esd:6  /limitaccess

dism restorehealth source: восстановить хранилище компонентов из оригинального образа Windows на установочном диске, ISO, WIM файле

Если при запуске появляется

  • Ошибка Error: 50: DISM does not support servicing Windows PE with the /Online option, значит ваша DISM считает, что вы используете WinPE образWindows. Чтобы исправить это, удалите ветку реестра HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MiniNT.
  • Ошибка DISM Error 87: проверьте правильно написания команды, убедитесь что вы используете версию DISM для вашей версии Windows (обычно бывает при загрузке через WinPE/WinRE).

Утилита DISM пишет подробный журнал сканирования и восстановления системных файлов в файл
C:\Windows\Logs\DISM\dism.log
.

После восстановления хранилища компонентов вы можете запустить утилиту проверки системных файлов
sfc /scannow
. Скорее всего она успешно восстановит поврежденные файлы:

Программа защиты ресурсов Windows обнаружила поврежденные файлы и успешно их восстановила. 
Windows Resource Protection found corrupt files and successfully repaired them.

sfc /scannow Программа защиты ресурсов Windows обнаружила поврежденные файлы и успешно их восстановила

Если все системные файлы целы, появится сообщение:

Windows Resource Protection did not find any integrity violations

Восстановление образа Windows с помощью PowerShell

В версии PowerShell в Windows 10/11 и Windows Server 2022/2019 есть аналоги рассмотренных выше команд DISM. Для сканирования хранилища компонентов и поиска повреждений в образе выполните:

Repair-WindowsImage -Online –ScanHealth

Repair-WindowsImage -Online –ScanHealth ImageHealth State: Healthy

Если ошибок в хранилище компонентов не обнаружено, появится сообщение:

ImageHealth State: Healthy

Для запуска восстановления системных компонентов и файлов наберите:


Repair-WindowsImage -Online -RestoreHealth

При отсутствии доступа к интернету эта команда может зависнуть в процессе восстановления образа. Вы можете восстановить системные компоненты из локальной копии образа Windows в виде WIM/ESD файла, скопированного с установочного ISO образа Windows 10 (здесь также нужно указать индекс версии Windows в wim файле в качестве источника восстановления):

Repair-WindowsImage -Online -RestoreHealth -Source D:\sources\install.wim:5 –LimitAccess

DISM: восстановление поврежденного хранилища компонентов, если Windows не загружается

Если Windows не загружается корректно, вы можете выполнить проверку и исправление системных файлов в оффлайн режиме.

  1. Для этого загрузите компьютер с установочного образа Windows (проще всего создать загрузочную USB флешку с Windows 10/11 с помощью Media Creation Tool) и на экране начала установки нажмите
    Shift + F10
  2. Чтобы разобраться с буквами дисков, назначенных в среде WinPE, выполните команду
    diskpart
    ->
    list vol
    (в моем примере диску, на котором установлена Windows присвоена буква C:\, эту букву я буду использовать в следующих командах);

    diskpart получить буквы дисков

  3. Проверим системные файлы и исправим поврежденные файлы командой:
    sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows

    sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows

  4. Для исправления хранилища компонентов используйте следующую команду (в качестве источника для восстановления компонентов мы используем WIM файл с установочным образом Windows 10, с которого мы загрузили компьютер):
    Dism /image:C:\ /Cleanup-Image /RestoreHealth /Source:WIM:D:\sources\install.wim:6

    Dism /image /RestoreHealth offline в windows 10

  5. Если на целевом диске недостаточно места, то для извлечения временных файлов нам понадобится отдельный диск достаточного размера, например F:\, на котором нужно создать пустой каталог:
    mkdir f:\scratch
    и запустить восстановление хранилища компонентов командой:
    Dism /image:C:\ /Cleanup-Image /RestoreHealth /Source:D:\sources\install.wim /ScratchDir:F:\scratch

Совет. Другие полезные команды DISM, которые должен знать администратор:

  • DISM /Add-Package
    – установка MSU/CAB файлов обновлений, интеграция обновлений в образ Windows;
  • DISM /Get-Drivers
    – получение списка установленных драйверов;
  • DISM /Add-Driver
    – добавление драйверов в образ;
  • DISM /Export-Driver
    – экспорт установленных драйверов Windows;
  • DISM /Add-Capability
    – установка дополнительных компонентов Windows через Features on Demand (например, RSAT, сервер OpenSSH или ssh клиент Windows;
  • DISM /Enable-Features
    и
    /Disable-Features
    – включение и отключение компонентов Windows (например, протокола SMBv1),
  • DISM /online /Cleanup-Image /StartComponentCleanup
    – очистка хранилища компонентов и удаление старых версий компонентов (папки WinSxS);
  • DISM /set-edition
    – конвертирование ознакомительной редакции Windows на полную без переустановки.

Using the DISM Commands



4 STEPS


EASY


2 MIN

Method 1


Overview

To repair a Windows 11 image using DISM commands is as shown below. This standard repair process works well for common issues with system file corruption.

Method 1 of 2

Next Method

Open Elevated Command Prompt

Press the Windows key, then search for «cmd».Right-click on Command Prompt and select Run as Administrator.

Method 1 of 2

Step 1 of 4

At the Command Prompt, type the following command and press Enter:

DISM /Online /Cleanup-Image /CheckHealth

This command checks your system health and does not make any changes.

If everything is in order, you will see the message: «No component store corruption detected. The operation completed successfully.»

Method 1 of 2

Step 2 of 4

If the CheckHealth scan detects a problem, run the following command to perform a deeper scan:

DISM /Online /Cleanup-Image /ScanHealth

This command performs a thorough scan for system corruption. It may take a few minutes, and if any issues are found, they will be repaired automatically, displaying: «Corruption detected. The operation completed successfully.»

Method 1 of 2

Step 3 of 4

To fix any issues detected in the previous step, execute the following command:

DISM /Online /Cleanup-Image /RestoreHealth

Wait for the process to complete, then restart your computer to apply the changes.

Caution:
A local source can save time and will not make mistakes in case the DISM command fails to retrieve some files online.

Method 1 of 2

Step 4 of 4

DISM RestoreHealth with Local Source



5 STEPS


EASY


2 MIN

Method 2


Overview

If your PC is offline or the online source is unavailable, you can use a local source to repair DISM. Follow these steps:

Download the Windows 11 ISO from the Microsoft website.

Select the editor for download.

Now, click on Download button (as shown above image).

After clicking the download button, your request will be validated. This may take a few minutes. Avoid refreshing or navigating back, as it will cancel the request.

Update:
Windows 11 ISOs for Arm64 devices will be made available in the coming weeks.

Method 2 of 2

Step 1 of 5

Right-click the ISO file and select Mount to mount the image as a virtual drive.

Method 2 of 2

Step 2 of 5

Determine the Drive Letter

Open File Explorer and note the drive letter of the mounted ISO (e.g., D:).

Method 2 of 2

Step 3 of 5

Open Command Prompt as Administrator. (view details in method 1)

Enter the following command, replacing D: with your ISO’s drive letter:

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

This command uses the mounted ISO as a local source for the repair process.

Method 2 of 2

Step 4 of 5

Once the repair is done, restart your PC to apply the changes.

Method 2 of 2

Step 5 of 5

Image

Run Commands in Safe Mode: If DISM commands fail or get stuck, boot into Safe Mode to limit background processes and avoid conflicts.

Create a Backup: Always back up your system or important files before starting repairs to ensure you can recover if anything goes wrong.

Check for Windows Updates After Repair: After completing the repair, check for Windows updates to ensure you have the latest patches and improvements.

Use Logs for Troubleshooting: If issues persist, check the logs at C:\Windows\Logs\DISM\dism.log for detailed error information that can help diagnose problems.

Consider System File Checker (SFC): Run SFC (sfc /scannow) after DISM to further detect and repair any system file corruption.

Windows 11, like its predecessor, features the built-in Deployment Image Servicing and Management (DISM), a command-line utility to troubleshoot critical system errors. The DISM commands can help you fix Blue Screen of Death (BSOD) errors, a slow computer due to broken system files, and even repair the Windows Recovery Environment.

In this article, we’ll show you how you can use the DISM and System File Checker utility to repair your damaged Windows 11 image and installation.

How to Use the DISM Command in Windows 11

The DISM command-line utility is a multi-purpose tool. It allows the system administrator to prepare and service Windows images. In addition, you can use the DISM tool in combination with the System File Checker utility to recover your Windows computer from critical failure.

While DISM supports multiple specified commands, to repair your Windows computer, you only need to know the DISM CheckHealth, DISM ScanHealth, and DISM RestoreHealth commands.

If you can boot into Windows 11, you can run the DISM command from an elevated PowerShell console or Command Prompt. If not, you’ll need to boot into the Windows Recovery Environment and launch Command Prompt from Advanced Options to run DISM.

Check Your System Health Using the DISM CheckHealth Command

You can check for any file corruption using the DISM CheckHealth command. It is a diagnostic tool used to detect system image corruption and report the same. However, it doesn’t perform any repair.

To run the CheckHealth command:

  1. Press the Win key and type cmd.
  2. Right-click on Command Prompt and select Run as administrator.

    DISM scan health powershell command

  3. In the Command Prompt window, type the following command and press Enter:

            DISM /Online /Cleanup-Image /CheckHealth
        
  4. In the above command, the /Online parameter specifies the scan must be performed on the currently running operating system. The /Cleanup-Image parameter specifies the operation is related to Windows image repair.
  5. When executed, the command will show the report as “The component stored has been corrupted” or “No component store corrupted detected.” depending on whether a component store corruption is found.

    DISM powershell CheckHealth command

  6. If you use PowerShell, use the following command instead:

            Repair-WindowsImage -Online -CheckHealth
        
  7. The PowerShell command will report your image status to indicate whether it is Healthy, Repairable or Non-repairable. A healthy image doesn’t need any further action, and you can proceed to run the SFC tool.

If the image is repairable, you can use the RestoreHealth command to use Windows Update to fix any corruption. However, for a non-repairable image, you may need to perform a clean install to fix your computer.

Perform an Advanced System Image Scan with the ScanHealth Command

DISM scan health command PowerShell

You can use the DISM ScanHealth command to perform an advanced scan of your Windows 11 system image. This will check your system for component store corruption and save the report to a log file.

To run the DISM ScanHealth command:

  1. Open PowerShell as administrator.
  2. Type the following command and press Enter:

            DISM /Online /Cleanup-Image /ScanHealth
        
  3. This process may take some time to complete. Once done, it will report any issues with the component store.
  4. If an issue is detected, run the DISM RestoreHealth command to repair your Windows image.

Run the DISM RestoreHealth Command to Repair the Windows System Image

DISM scan health restore health command prompt

The DISM RestoreHealth command uses Windows Update to provide the necessary files to fix file corruption and repair the Windows 11 system image. However, you must be connected to the internet so that the DISM tool can download and restore the files needed to perform a repair.

To run the DISM RestoreHealth command:

  1. Open Windows PowerShell as administrator.
  2. Next, type the following command and press Enter:

            DISM.exe /Online /Cleanup-image /RestoreHealth
        
  3. The DISM utility will perform a scan and start repairing the Windows system image. This process may take some time to complete. So, wait till the progress bar reaches 100%.

Repair System Image Using an Alternate Repair Source

The DISM RestoreHealth command may not work if your computer is not connected to the internet or if the Windows Update component is corrupt. In this situation, you can use a Windows installation media or a mounted Windows ISO as a local source to repair the system image.

First, create a bootable Windows 11 USB drive. Once you have the installation media ready, connect it to your computer and proceed with the below steps.

To repair your Windows 11 system image using DISM and a local repair source:

  1. Press Win + E to open File Explorer.
  2. Open your installation media drive, open the Sources folder and make sure the install.wim file exists. Also, note the driver letter assigned to your installation media. In this instance, our installation media is assigned the drive letter (I:).

    install wim file in Windows 11 installation media

  3. Next, type the following command to run the DISM RestoreHealth command with the installation media as a repair source:

            DISM /Online /Cleanup-Image /RestoreHealth /Source:I\Sources\install.wim /LimitAccess
        
  4. In the above command, replace the placeholder :I with your installation media drive letter. Also, the LimitAccess command is an optional parameter that restricts DISM access to the specified source and prevents it from using Windows Update as a repair source.
  5. Once the process is complete, you can close Command Prompt and run the System File Checker utility to complete the repair process.

Repair Your Windows Installation Using the System File Checker (SFC) Utility

Windows 11 Command Prompt running the System File Checker utility.

Once you have successfully repaired your Windows 11 system image using the DISM RestoreHealth command, run the System File Checker (SFC) utility. It will scan your Windows installation for system file corruption and fix them automatically.

In almost all instances, you must run the System File Checker utility after using the DISM image repair command to complete the repair process. Here’s how to do it:

  1. Press Win + X to open the WindowsX menu.
  2. Click Terminal (Admin) to launch the Windows Terminal app as administrator.
  3. In the Terminal window, type the following command to run the System File Checker utility:

            sfc /scannow
        
  4. When you run the above command, the System File Checker utility will start verifying the integrity of system files to detect corruption. If detected, it’ll automatically try to repair by replacing the files with a cached copy located at %WinDir%\System32\dllcache.

The SFC process may take some time to complete and often may feel stuck at some stage. If you see no progress for a long time, press the Enter key a few times on your keyboard to refresh the Command Prompt window to view real-time progress.

After the process is complete, restart your computer and check for any improvements. If the issue persists, run the sfc /scannow command again to see if that helps fix the problem.

Repair and Recover Your Windows System Image Using DISM and SFC

DISM makes it easy to repair a corrupt Windows image. It works both online using Windows Update and offline with a WIM file. The steps to use DISM may look complicated at first glance; however, it only takes two commands and an elevated Command Prompt to repair your Windows 11 image and installation.

Windows 11 fix with DISM and SFC

(Image credit: Mauro Huculak)

On Windows 11, the Deployment Image Servicing and Management (DISM) tool is a powerful built-in utility designed for advanced servicing, modification, and repair of system images using commands. While it’s commonly used by network administrators, you can also use it (especially when combined with the System File Checker (SFC)) to troubleshoot and resolve persistent system issues.

Typically, when your device experiences performance degradation, unexpected errors, or startup problems, you start by running the SFC tool. This command scans and replaces missing or corrupted system files using the local image. However, if the underlying image is also damaged, SFC won’t be able to complete the repair successfully.

In such cases, you can turn to DISM to restore the system image to a healthy state. Once the image is repaired, running SFC again will allow it to properly replace any corrupted system files, effectively resolving the issue.

In this how-to guide, I’ll outline the steps to use command-line tools to fix most problems on Windows 11.

Important: This is a non-destructive process, but it’s still recommended to create a system backup before proceeding.

Recent updates

These instructions has been updated to ensure accuracy and reflect changes to the process in the operating system.

How to use DISM to fix image problems on Windows 11

The DISM command has the «CheckHealth,» «ScanHealth,» and «RestoreHealth» options to scan and detect issues, and you want to use them in order. If the scans return errors in the image, you can use the «RestoreHealth» option to fix them.

Check health option

The DISM’s CheckHealth option helps to determine any corruption inside the local image. However, the option does not perform any repairs.

All the latest news, reviews, and guides for Windows and Xbox diehards.

To check the Windows 11 image for issues with the DISM command, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to perform a quick check and press Enter: DISM /Online /Cleanup-Image /CheckHealth

CheckHealth

(Image credit: Future)

Once you complete the steps, the Deployment Image Servicing and Management tool will verify any data corruption that may require fixing.

Scan health option

The ScanHealth option performs an advanced scan to find issues with the image.

To check image problems with the ScanHealth option, use these steps:

  • Open Start.
  • Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  • Type the following command to perform an advanced DISM scan and press Enter: DISM /Online /Cleanup-Image /ScanHealth

ScanHealth

(Image credit: Future)

After you complete the steps, the scan could take some time to check whether the operating system needs any repairs.

Restore health option

The DISM’s RestoreHealth option automatically scans and repairs common issues in the current setup.

To repair system problems with the DISM commands, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to repair the Windows 11 image and press Enter: DISM /Online /Cleanup-Image /RestoreHealth

Windows 11 DISM restorehealth command

(Image credit: Future)

Once you complete the steps, the command tool will download and replace damaged files from the «Windows Update» online service (as necessary).

If the command seems stuck, this is normal behavior. After a few minutes, the process will be complete without further action.

Install.wim image option

In rare cases, DISM may be unable to replace the corrupted files, especially if the system lacks internet access or the local repair content is unavailable. When this happens, you’ll need to manually specify a clean source using the /Source option.

A reliable way to do this is by mounting a Windows 11 ISO file to provide the necessary repair files. However, it’s critical that the ISO matches the exact version, edition, and language of the installation you’re repairing. Using a mismatched image could cause the repair process to fail or introduce compatibility issues.

Download Windows 11 ISO

To download the Windows 11 ISO file, use these steps:

  1. Open the Microsoft Support website.
  2. Select the Windows 11 option under the «Download Windows 11 Disk Image (ISO)» section.
  3. Click the Download button.

Windows 11 ISO download

(Image credit: Future)
  1. Select the installation language.
  2. Click the Confirm button.
  3. Click the Download button to save the ISO file on the computer.

Download ISO of Windows 11

(Image credit: Future)
  1. Double-click the ISO file to mount it to File Explorer.
  2. Confirm the drive letter of the mount from the left navigation pane.

Check virtual drive letter

(Image credit: Future)

After you complete the steps, you can use the «Source» option to repair the local image.

Repair image with recovery image

To run DISM with the install.wim image to repair Windows 11, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to repair the local image and press Enter: DISM /Online /Cleanup-Image /RestoreHealth /Source:E:\Sources\install.wim

RestoreHealth with Install.wim

(Image credit: Future)

In the command, replace «E» with the ISO mount point drive letter in File Explorer.

  1. (Optional) Type the following command to limit the use of Windows Update and press Enter: DISM /Online /Cleanup-Image /RestoreHealth /Source:E\Sources\install.wim /LimitAccess
  2. (Optional) Type the following command variant to accomplish the same task and press Enter: DISM /Online /Cleanup-Image /RestoreHealth /Source:wim:E:\Sources\install.wim:1 /LimitAccess

In the command, change «E:\Sources,» for the path to the «install.wim» file location.

Once you complete the steps, the Deployment Image Servicing and Management command will scan and repair the problems using the «.wim» file.

How to use SFC to fix problems on Windows 11

The DISM commands will help to resolve issues with the system image, not the problems with the setup. Once the local image is restored to a healthy working state, you can use the System File Checker (SFC) command to repair the Windows 11 installation.

To use the SFC command tool to repair problems on Windows 11, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to repair the installation and press Enter: SFC /scannow

SFC Scannow

(Image credit: Future)
  • Quick tip: If the tool determines that the system has errors, it’s recommended to run the command several times to ensure that everything was fixed correctly.

Once you complete the steps, the System File Checker tool will repair the system files using the local image files, and the log files will be created on «%windir%/Logs/CBS/CBS.log» and «%windir%\Logs\DISM\dism.log,» which you can review to get more details about the repair.

More resources

For more helpful articles, coverage, and answers to common questions about Windows 10 and Windows 11, visit the following resources:

  • Windows 11 on Windows Central — All you need to know
  • Windows 10 on Windows Central — All you need to know

Mauro Huculak has been a Windows How-To Expert contributor for WindowsCentral.com for nearly a decade and has over 15 years of experience writing comprehensive guides. He also has an IT background and has achieved different professional certifications from Microsoft, Cisco, VMware, and CompTIA. He has been recognized as a Microsoft MVP for many years.

DISM stands for Deployment Image Servicing and Management, a command line tool prepare, modify and repair windows system images including windows recovery environment, windows setup and windows PE (winPE). Also, you can use this command dism /online /cleanup-image /restorehealth to scan and restore potential issues within the windows that may impact windows OS. Usually we recommend run system file checker (SFC) utility to scan and repair windows system files. But when sfc utility fails to repair system files the DISM restore health command services Windows images and repairs your Windows installation by downloading actual replacement files from Windows’ online servers. This article explains what is DISM command and its restorehealth function.

Contents

  • 1 What is DISM command
    • 1.1 Use of DISM command
    • 1.2 How To Use DISM To Repair Windows Image
    • 1.3 DISM with source option
    • 1.4 DISM Error: 0x800f0954
    • 1.5 Repair the current Windows Installation

What is DISM command

DISM or Deployment Image Servicing and Management (DISM.exe) is a built-in Microsoft Command Line tool used to repair your Windows image or to modify Windows installation media. Using this tool you can mount Windows images in .wim, .vhd, or .vhdx format and use to address problems or errors with currently installed windows OS. It also perform advanced scan to repair system files, and its very helpful when system file checker utility fails to repair windows files on your computer.

DISM is nota complete reinstallation of Windows; instead, it finds critical core files required to run and gather information, then upgrades or repairs any files that are corrupted or out-of-date.

Use of DISM command

Whenever you experience system crash with blue screen errors or unexpected application crash or utilities or functions these are symproms of systme file corruption. And we recommend run system file checker utlity that scan all protected system files, and replace corrupted files with a cached copy that is located in a compressed folder at %WinDir%\System32\dllcache. But if system file scan results, found corrupt files but was unable to fix some of them the you can use the “install.wim” image with DISM to overcomes this issue. .

DISM command incude three options to repair an windows image

/checkhealth Starts a basic check to see if corruption has been detected in the store
/scanhealth Performs a more comprehensive scan of the store for corruption
/restorehealth Scans the store for corruption and also repairs corrupted files

In addtion:
/online Signifies that you are modifying an online image (does not signify that a scan will run over the internet)
/cleanup-image Triggers a more extensive check which can resolve issues with the store

Overall when SFC and CHKDSK fails to repair corrupted system files, then next troubleshooting step to run DISM (Deployment Image Servicing and Management).

How To Use DISM To Repair Windows Image

Press windows key + S and type cmd, right click on command prompt select run as administrator,

  1. First run command : DISM /Online /Cleanup-Image /ScanHealth, this will scan and determine any corruptions inside the local Windows image.
  2. The command DISM /Online /Cleanup-Image /CheckHealth, determine if the system image is repairable but this will not repair any errors.
  3. If there are porblems with system image, run command DISM /Online /Cleanup-Image /RestoreHealth to automatically scan and repair common issues. Use windows update as source to download and replace the corrupt files and restore the health of the Windows image.

Note – The scanning takes around five to ten minutes or sometimes more, depending on your system and the number of corrupted files

Make sure you are connected to internet while running the DISM command for the files to be automatically restored. This is what Microsoft says on how to best utilize DISM.

Also you can Run DISM Utility through PowerShell

  • For CheckHealth: Repair-WindowsImage -online –CheckHealth
  • For ScanHealth: Repair-WindowsImage -online –ScanHealth
  • For RestoreHealth: Repair-WindowsImage -online -RestoreHealth

DISM with source option

DISM use your Windows Updates files to repair any corrupt files, but if Windows updates files are also corrupted and DISM unable to repair the files then you need to use a Windows installation media as a source that can be used to repair your Windows files.

  • First download the Windows 11 ISO file Microsoft server,
  • Right click on ISO image and select mount, And note down the drive letter (Form for its E)

Again open command prompt as administrator and run command: DISM /Online /Cleanup-Image /RestoreHealth /source:E:\Sources\Install.wim /LimitAccess

Note – replace the source path “E” with the correct ISO mount point drive letter in File Explorer.

The command scan and repair the windows image using the “install.wim” file you specified as the alternative source.

Note – If you have windows 10 installed on your device, make sure to use windows 10 ISO as source.

In Addition Check out Microsoft’s support pages to learn more on configuring Windows repair sources and repairing Windows images.

DISM Error: 0x800f0954

Sometimes runnign DISM command may result, Error: 0x800f0954 – DISM failed. No operation was performed. Most of time third-party antivirus program interferes with the DISM during command execution result this error. In addition active proxy, read-only access install.wim or windows update service not running also cause this error.

  • Temporarly Disable or uninstall Antivirus program
  • Open windows services using services.msc and restart the windows update service
  • Disable proxy server, right-click the install.wim file select properties and here remove the read only permission.

If you are getting DISM error 50 while runnng running the above commands, this can cause because of a misplaced registry key.

  • Open windows registry editor and nivigate, HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControl.
  • Locate the MiniNT folder and remove it, now restart your PC and run DISM command again.

Repair the current Windows Installation

The above DISM command repair the windows image but actual windows installation files isnt repaired yet. And to repair windows files you need to run the SFC command.

  • Open command prompt as administrator and run command sfc /scannow
  • Let the scanning complete 100%, once done reboot your computer.
  • For better result we recommend run sfc command in windows safe mode.

The System File Checker tool repair the windows files using the local image files, and the log files will be saved on %windir%/Logs/CBS/CBS.log.

  • What system file checker utility do?

The sfc /scannow command-line utility scan and repair protected system files in Windows PC.

  • What to do, SFC SCANNOW Cannot Repair Corrupted Files?

Run sfc command in safe mode, still the utilty unable to repair system files you need to run DISM restore health command to repair system image first.

  • Difference Between SFC, CHKDSK, and DISM

The sfc command repair system files while chkdsk repair disk errors and DISM repair system files when sfc fails to complete its job.

  • Did DISM command delete some of my system files?

No, DISM won’t affect any of your apps or data. It only repair critical core files required to run and gather information.

  • Full form of DISM?

Deployment Image Servicing and Management (DISM.exe)

Also read:

  • Fix DISM Error 0x800f081f The Source Files Could Not Be Found
  • Windows 11 Critical Structure Corruption BSOD Error (5 Working solutions)
  • Solved: Nvidia GeForce Experience Error Code 0x0003 on windows 11
  • How to fix Your PC did not start correctly windows 11 (6 Solutions)
  • How to BackUp Windows 11 to external device or cloud storage

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Kaspersky security center windows server 2003
  • Samsung rv515 установить windows с флешки
  • Активация пиратской windows 10 pro
  • Exchange activesync client for windows
  • Desktop windows manager грузит процессор