Windows deployment image servicing and management dism

Для проверки целостности системных файлов и восстановления поврежденных файлов (библиотек) компонентов в 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 на полную без переустановки.

A Windows image file is a compressed file containing the Windows operating system and software, settings, and configurations for your hard drive. This file is like a photocopy of the drive and can be used for a number of reasons, including backing up your system or repairing it if something goes wrong with your operating system or hard drive. 

At some point, you’ll need to modify, repair, or install updates to your Windows image. That’s when you’ll need the DISM command. 

Introduction to DISM command

The Deployment Image Servicing and Management (DISM) command is valuable for system administrators because it makes fixing corrupted or missing Windows system files easier. Knowing how to use the Windows DISM command can greatly enhance your ability to deploy and service Windows images effectively.

What is Deployment Image Servicing and Management (DISM)?

DISM is a command-line tool built into Windows systems. It is used for servicing and managing Windows images, including deployment, updates, and repair. With its extensive capabilities, the DISM command allows you to perform various operations on Windows images, such as mounting and unmounting images, adding or removing drivers, enabling or disabling features, applying updates, and more. 

Why use the DISM command?

The DISM command provides many benefits and advantages for Windows image deployment and servicing. Here are a few reasons why you should know how to use the Windows DISM command:

  • Efficiency and flexibility: The DISM command offers a flexible and efficient way to manage Windows images. It allows you to perform various operations on images without a graphical user interface (GUI), making it suitable for automation and scripting.
  • Compatibility and integration: Since DISM is an official Microsoft tool that is built into Windows systems, it’s fully compatible with the Windows operating system and seamlessly integrates with other Windows tools and technologies. 
  • Advanced features: The DISM command provides advanced features and functionalities not available through other tools or commands, allowing you to add custom drivers, apply updates, enable or disable features, or perform other image servicing tasks.
  • Troubleshooting and repair: DISM offers powerful troubleshooting and repair capabilities, helping you identify and fix issues with Windows images, such as corrupted files, missing components, and more.

Leveraging the DISM command lets you streamline your Windows image servicing for a more efficient and reliable IT infrastructure.

Using the DISM command for Windows image deployment

Now let’s dive into how to use the DISM command for Windows image deployment. DISM provides a wide range of options and parameters to perform various operations on Windows images. Here are some common use cases for the Windows DISM command:

Mounting and unmounting images

One of the fundamental operations you can perform with the DISM command is mounting and unmounting Windows images. Mounting an image lets you access its contents and make changes to it. Once you’ve made the necessary modifications, you can unmount the image to apply the changes and prepare the updated image for deployment.

To mount an image using the DISM command, you can use the following syntax:

dism /mount-wim /wimfile:<path_to_image> /index:<image_index> /mountdir:<mount_directory>

In this example, <path_to_image> is the path of the Windows image file, <image_index> is the index number of the image within the file, and <mount_directory> refers to the directory where you want to mount the image.

Adding and removing drivers

Use the DISM command to add or remove device drivers from a mounted or offline Windows image. This can be useful when supporting new hardware or troubleshooting driver-related issues.

Add a driver to a Windows image using the following command:

dism /image:<image_path> /add-driver /driver:<driver_path>

Here, <image_path> refers to the path to the Windows image, and <driver_path> is the path to the driver file you want to add.

To remove a driver from a Windows image, you can use the following command:

dism /image:<image_path> /remove-driver /driver:<driver_name>

In this case, <driver_name> is the name of the driver you want to remove.

Applying updates

Keeping your Windows images updated is crucial for security and performance reasons. The DISM command allows you to apply updates to a Windows image online or offline easily. This ensures that the image includes the latest patches and fixes.

Use the following command to apply updates to a mounted or offline Windows image:

dism /image:<image_path> /add-package /packagepath:<update_path>

Here, <image_path> is the path to the Windows image, and <update_path> is the path to the update package you want to apply.

Additional DISM command-line options are available in Microsoft’s Windows Learn database.

Windows DISM command best practices

The DISM command is a helpful tool, and following best practices will help ensure smooth and successful Windows image deployment and servicing. Here are some best practices to keep in mind when using the DISM command:

  • Use the latest version: Always verify that you’re using the latest version of the Windows DISM command. Microsoft regularly releases updates and improvements for DISM to enhance its capabilities and address any known issues.
  • Verify image integrity: Before performing any operations on a Windows image, it’s a good idea to verify its integrity. You can use the Windows DISM command with the /checkhealth parameter to check the image’s health and identify any corruption or issues. Note that /checkhealth only identifies issues; it doesn’t fix them.
  • Keep backup copies: Whenever you make changes to a Windows image using the DISM command, you should keep backup copies of the original image to ensure that you can easily revert back to the original state if any issues arise.
  • Document changes: Document any changes you make when making modifications to Windows images using the DISM command. This helps with tracking and troubleshooting any issues that may arise later.
  • Disable antivirus tools: Antivirus and antimalware tools can block or impact some DISM commands. You can configure your computer to skip the mount folder during scans.

Limitations and alternatives to DISM command

While the DISM command is a useful tool for servicing Windows images, it does have some limitations. Here are a few limitations to be aware of:

  • Complexity: The DISM command can be complex for beginners or users unfamiliar with command-line tools, and it requires a good understanding of the structure of Windows images.
  • Compatibility: The DISM command is primarily designed for Windows systems and may not be compatible with other operating systems. If you need to perform image deployment and servicing on non-Windows systems, you may need to explore alternative tools or methods.
  • Learning curve: Mastering the DISM command requires time and effort to understand various options, parameters, and syntaxes. If you want to use it effectively, plan to invest time in learning and practicing the DISM command.

If you find the DISM command too complex or if you are working with non-Windows systems, there are alternatives available. 

Using the DISM command to simplify Windows

The DISM command is a versatile tool offering a wide range of features and capabilities that can greatly enhance your ability to manage and deploy Windows images. The DISM command and other command-line operations can save you time and effort in managing the Windows operating system. 

Windows 10 DISM and SFC repair

Windows 10 DISM and SFC repair
(Image credit: Mauro Huculak)

Deployment Image Servicing and Management (DISM) is a command-line tool built into Windows 10 that allows network administrators to prepare, modify, and repair system images, including Windows Recovery Environment, Windows Setup, and Windows PE (WinPE). However, you can also use the tool with the local recovery image to fix most system problems.

When you try to fix a specific error, figure out why the computer stopped booting correctly, or resolve performance problems, the System File Checker (SFC) is one of the best to replace missing or corrupted system files using the recovery image. The only caveat with this approach is that if one or more system files in the local image are damaged, the SFC command won’t work. In this scenario, you can use the «install.wim» image file with DISM to repair the image and then use the SFC tool to fix the setup without reinstalling the operating system.

In this how-to guide, I will show you how, in 2025 and beyond, the DISM and SFC are the best tools for restoring a computer from a broken to a healthy working state without reinstallation.

Warning: The commands outlined in this guide are non-destructive, but since you will be making system changes, it is still recommended to create a temporary full 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 repair image of Windows 10

The DISM command tool includes multiple features to repair a system image, including «CheckHealth,» «ScanHealth,» and «RestoreHealth,» and you want to use them in that order. Also, depending on the issue, you can use the «RestoreHealth» option to fix the locally available image using different source files.

DISM command with CheckHealth option

The «CheckHealth» option with the DISM determines any corruptions inside the local Windows 10 image. However, this option does not perform any sort of repair.

To check the image of Windows 10 for issues with DISM, use these steps:

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

  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

DISM CheckHealth

(Image credit: Mauro Huculak)

Once you complete the steps, the DISM tool will run and verify any data corruption that may require fixing inside the local image.

DISM command with ScanHealth option

The «ScanHealth» option performs a more advanced scan to find out whether the image has any issues.

To check image problems with the «ScanHealth» option, 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 an advanced DISM scan and press Enter: DISM /Online /Cleanup-Image /ScanHealth

DISM ScanHealth

(Image credit: Mauro Huculak)

After completing the steps, the scan may take some time to check whether the image needs fixing.

DISM command with RestoreHealth option

If the system image has problems, the «RestoreHealth» option scans and repairs common issues automatically.

To repair Windows 10 local image problems with DISM, 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 image and press Enter: DISM /Online /Cleanup-Image /RestoreHealth
  • Quick note: It’s normal if the command appears stuck. After a few moments, the process will be completed successfully.

DISM RestoreHealth

(Image credit: Mauro Huculak)

Once you complete the steps, the Deployment Image Servicing and Management tool will connect to the «Windows Update» servers to download and replace damaged files (if applicable).

Fix problems with DISM using install.wim image

The Deployment Image Servicing and Management commands typically don’t cause issues. However, if the tool finds problems replacing the damaged files or the computer doesn’t have an internet connection, you can use another image using the «Source» option. Usually, you can use an «install.wim» or «install.esd» file from another device, install media, or ISO file. You only need to ensure the files match the version, edition, and language of the version you are trying to fix.

Download Windows 10 ISO file

If you need another file source, use the Media Creation Tool to download a fresh copy of Windows 10.

To download the ISO file of Windows 10, use these steps:

  1. Open this Microsoft support website.
  2. Click the Download Now button.
  3. Double-click the MediaCreationTool_xxxx.exe file to launch the setup.
  4. Click the Accept button to agree to the terms.
  5. Select the «Create installation media (USB flash drive, DVD, or ISO file) for another PC» option.

Media Creation Tool create media for another PC

(Image credit: Mauro Huculak)
  1. Click the Next button.
  2. Click the Next button again.

Select language, architecture, and edition

(Image credit: Mauro Huculak)
  1. Select the ISO file option.

Media Creation Tool ISO file option

(Image credit: Mauro Huculak)
  1. Click the Next button.
  2. Select the destination to store the Windows 10 ISO file.
  3. Click the Save button.
  4. Click the link to open the file location on File Explorer.

Open Windows 10 ISO location

(Image credit: Mauro Huculak)
  1. Click the Finish button.
  2. Double-click the Windows.iso file to mount the image.
  3. Confirm the drive letter for the mount point of the ISO file under the «This PC» section.

Windows 10 ISO drive letter

(Image credit: Mauro Huculak)

After you complete the steps, continue with the DISM tool using the «Source» option to repair the image locally stored on the computer.

Fix Windows 10 recovery image

To run the Deployment Image Servicing and Management tool with an alternate source (install.wim) image, 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 image and press Enter: DISM /Online /Cleanup-Image /RestoreHealth /Source:E:\Sources\install.wim

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

DISM RestoreHealth with install.wim file

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

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

Once you complete the steps, the command will scan and repair the problems using the «install.wim» file you specified as the alternative source.

Fix problems with DISM using ESD image

In case you have an encrypted «install.esd» image, it’s possible to use that image to repair the damaged system files on Windows 10.

To use DISM with an «install.esd» image file as the source to repair Windows 10, 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 image with an «install.esd» file and press Enter: DISM /Online /Cleanup-Image /RestoreHealth /Source:C:\ESD\Windows\sources\install.esd

In the command, change «C:\ESD\Windows\sources» with the path to the location of the «.esd» file (if different).

DISM Restorehealth install.esd

(Image credit: Future)
  1. (Optional) Type the following command to limit the use of Windows Update and press Enter: DISM /Online /Cleanup-Image /RestoreHealth /Source:C:\ESD\Windows\sources\install.esd /LimitAccess
  2. (Optional) Type the following variant of the previous command to accomplish the same task and press Enter: DISM /Online /Cleanup-Image /RestoreHealth /Source:esd:C:\ESD\Windows\sources\install.esd:1 /LimitAccess
  3. (Optional) Type the following command to use an install.esd file located in another drive and press Enter: DISM /Online /Cleanup-Image /RestoreHealth /Source:E:\Sources\install.esd

In the command, replace «E:\Sources» with the path to the location of the «install.esd» file.

After you complete the steps, the tool will repair the damaged files using the files included in the «install.esd» image.

Troubleshooting common errors

If the RestoreHealth command fails, depending on the error, you can try these fixes:

  • Error 0x800f081f: The source files could not be found – You can resolve this error by running the DISM /Online /Cleanup-Image /RestoreHealth /Source:wim:D:\sources\install.wim:1 /LimitAccess command.
  • Error 87: The parameter is incorrect – Check the command for typos and re-try it. Commands are case-insensitive, but spaces must be exact.
  • DISM stuck at 20%, 40%, or 80% – Restart the computer and try again. It can also help run the chkdsk C: /f /r /x command to check for disk errors. However, before taking any actions, consider that sometimes, if the command appears stuck, it could also mean the tool is busy repairing the system.
  • Error 0x800f0906: DISM fails to download files – This error indicates that the tool is having issues downloading files from Windows Update. In this case, ensure your internet connection is stable. Try using a local Windows installation source using the above steps.

You can also examine the command-line tool log file located at C:\WINDOWS\Logs\DISM\dism.log to find clues to determine the exact problem.

If you’re unable to get this DISM command working and the current setup has problems, you may want to consider resetting the computer to the factory default with the Reset this PC feature or by performing a clean installation of Windows 10.

How to run SFC to repair problems on Windows 10

The above steps are meant to repair issues with the system image, not the problems with the installation of Windows 10. After restoring the image to a healthy state, you can use the System File Checker command tool to repair the current setup of Windows 10.

To use the SFC command tool to repair system problems, 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
  • Quick tip: If errors are found, you may want to run the command around three times to ensure that everything was fixed correctly.

Windows 10 installation repair with SFC

(Image credit: Mauro Huculak)

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 saved on «%windir%/Logs/CBS/CBS.log» and «%windir%\Logs\DISM\dism.log,» which you can view to get more details about the process.

You can use these instructions to learn more ways to use the SFC tool to fix problems on Windows 10.

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

When the system file checker fails to repair corrupt Windows files, DISM /Online /Cleanup-Image /RestoreHealth command is used to address the issue. The Deployment Image Servicing and Management (DISM) tool in Windows, administrators use to Check Health of the Windows Image, Scan for Component Store Corruption, or Repair Windows Image. In short, the DISM restorehealth command is designed for administrators to prepare, modify, and repair system images, including Windows Recovery Environment, Windows Setup, and Windows PE (WinPE). This article explores the capabilities of the dism /online /cleanup-image /restorehealth command and how it can be used to repair a Windows image.

What is a Windows Image?

A Windows image is a compressed file that contains all the files, settings, and configurations required to install and run a Windows operating system.

Post Contents :-

  • 1 When Need to run the DISM Command line?
  • 2 Repair Windows System Image using DISM Command
    • 2.1 DISM ScanHealth Command
    • 2.2 DISM RestoreHealth Command
    • 2.3 Run DISM command with Source options
    • 2.4 Run System File Checker Utility

When Need to run the DISM Command line?

If for some reason, windows system files get corrupted or missing it can lead to various issues on Windows PC. Such as you may experience frequent system crashes with blue screen errors, Windows freezes, not responding and it’s very slow. Running system file checker scan results Windows resource protection found corrupt files but was unable to fix some of them.

Run a DISM restore health Scan if SFC Can’t Repair Corrupt Files

Running the DISM scan with the appropriate parameters can help repair and restore the system files, resolving these issues.

Also, you can Run the DISM restore health command to fix Windows update problems, such as failed updates or update installation is stuck. It can repair the Windows image and ensure the proper functioning of the Windows Update service.

Repair Windows System Image using DISM Command

It’s important to note that running the DISM scan Command requires administrative privileges. Also, it’s recommended to create a system restore point or backup before making any changes to the Windows image. So that in case things go wrong, and you need to revert back the changes.

Ensure your device is connected to a stable and working internet connection as DISM uses Windows updates as a Source to repair the system image.

Now Let’s explore Different DISM Command line options and How it can be used to Repair the Windows system image.

There are three main options you can use with DISM scan command to repair the Windows image on your computer, including CheckHealth, ScanHealth, and RestoreHealh.

Press Windows key + S and type cmd, Right-click on the command prompt and select run as administrator. And you can run the following DISM commands.

  • DISM /Online /Cleanup-Image /CheckHealth
  • DISM /Online /Cleanup-Image /ScanHealth
  • DISM /Online /Cleanup-Image /RestoreHealth

Note: DISM /CheckHealth only determines any corruptions inside the system image, while /ScanHealth performs more advanced scan to find out whether the system image has any issues.

DISM ScanHealth Command

DISM Command line With /ScanHealth Switch checks for component store corruption and records that corruption to the C:\Windows\Logs\CBS\CBS.log but no corruption is fixed or repaired using this switch. This is useful for logging what if any, corruption exists.

Here’s what the DISM /ScanHealth command does: 

  • Scan the Windows image to detect any corruption, missing files, or other issues that may exist within the system.
  • Verifies the integrity of the component store, which is a repository of Windows system files located in the %WinDir%\WinSxS folder.
  • Generates a report that indicates whether any corruption or problems were found in the Windows image.

To Run the command, open the Command prompt As administrator, Then Type the command Bellow and hit the Enter key.

Dism /Online /Cleanup-Image /ScanHealth

This will start the scanning process for system image corruption. This could take 10-15 minutes.

DISM RestoreHealth Command

The DISM command with the /RestoreHealth switch scans the Windows image for any corruption and performs repair automatically. This operation takes 15 mins or more depending on the level of corruption.

Here’s what the DISM /RestoreHealth command does:

  • Initiates a scan of Windows images to identify any corruption or problems within the system.
  • If it detects corrupt files, it tries to retrieve the necessary files from Windows Update to repair the image automatically.
  • DISM command attempts to repair the Windows image by replacing the corrupted or missing files with the correct versions from the source.

To run, the DISM RestoreHealth command, open the Administrator command prompt type the Command below and hit the Enter key.

Dism /Online /Cleanup-Image /RestoreHealth

Since the /restorehealth switch relies on Windows Update to provide repair files, ensure that the system has an active internet connection during the command’s execution.

The above command will try to use Windows Update to replace the damaged files. This process takes a long time to complete. If the problem has also extended to the Windows Update components, then you’ll need to specify a source containing the known good files to repair the image.

Note: Depending on the system’s configuration and the extent of corruption, the dism /online /cleanup-image /restorehealth command may take some time to complete. Be patient and avoid interrupting the process prematurely.

Run DISM command with Source options

Usually, when you run DISM /RestoreHealth command it it will attempt to retrieve the required files from Windows Update to repair the system image. This requires an active internet connection.

But If an internet connection is not available or the required files cannot be retrieved from Windows Update, You can use a local Windows installation media (such as a DVD or USB) as the repair source.

To Run DISM with Source options, first Download the Windows 10 ISO, 32-bit, Or 64 Bit with the same version and edition of your current version of Windows 10. After completing the Download process, right-click the ISO File, Select Mount, and note down the Drive path.

Now-Again open the Command prompt As administrator then Type the command

DISM /Online /Cleanup-Image /RestoreHealth /source:D:\Sources\Install.wim /LimitAccess

Note: Replace D with the letter drive on which your Windows 10 ISO is mounted.

This will perform a Windows image repair using the known good files included within the install.wim file using the Windows 10 installation media, without trying to use Windows Update as a source to download the required files for repair.

Wait until 100% complete the Scanning Process. Once the process is complete, DISM will create a log file in %windir%/Logs/CBS/CBS.log and capture any issues that the tool finds or fixes. After that Restart your computer to take Fresh Start.

Run System File Checker Utility

Now, after run the DISM (Deployment Imaging and Servicing Management) Tool, it will repair those corrupted files that sfc/scannow command is unable to modify the issues at a later time.

Now again open the Command prompt As administrator and type Command sfc /scannow hit enter key to run System file checker Utility. This will check and repair missing corrupted system files.

This Time System file checker Utility will successfully scan and restore the missing, damaged corrupted system files with a Good Copy from a special Cache folder located on %WinDir%\System32\dllcache.

Wait until 100% complete the scanning and repairing process. After that restart the Windows computer. That’s all now you have successfully repaired missing corrupted system files using the SFC utility or Repair system image running the DISM Command line tool.

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

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Загрузиться в safe mode windows 10
  • Программа для прозрачного пуска windows 10
  • Online windows xp operation system simulator
  • Какой тип флешки нужен для установки windows 10
  • Enable tls windows 10