Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
The Deployment Image Servicing and Management (DISM) tool is a powerful command-line utility that allows system administrators and users to check and repair the integrity of the Windows operating system image. When Windows becomes unstable, fails to boot, or experiences errors related to built-in applications or services, running DISM can often resolve these issues.
This guide will walk you through using the SFC (System File Checker) and DISM commands, including sfc /scannow
, DISM /Online /Cleanup-Image /RestoreHealth
, and Repair-WindowsImage -Online -RestoreHealth
(PowerShell) to diagnose and fix Windows image corruption. These commands are applicable to Windows 10, Windows 11, and Windows Server 2022/2019/2016.
Before using DISM, it's recommended to run System File Checker (SFC) to check for corrupted system files and attempt repairs.
cmd
as Administrator).sfc /scannow
If SFC reports errors but cannot fix them, extract relevant log details:
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log > "%userprofile%\Desktop\sfc.txt"
This saves the SFC-related logs to a file called sfc.txt
on your desktop.
The Windows Component Store (WinSxS folder) stores system files required for system repairs. If this store is corrupted, it may cause system instability.
DISM /Online /Cleanup-Image /CheckHealth
ScanHealth
.DISM /Online /Cleanup-Image /ScanHealth
This process can take 10-30 minutes and may return one of these results:
RestoreHealth
.If corruption is found, run the RestoreHealth command to repair the Windows image.
DISM /Online /Cleanup-Image /RestoreHealth
If the restore operation fails, you may see errors such as:
0x800f081f
– The source files could not be found.0x800f0906
– The source files could not be downloaded.0x800F0950
– No operation was performed.If you don't have internet access or Windows Update is unavailable, use a local Windows installation ISO or WIM/ESD file.
Check Windows Version
Get-ComputerInfo | select WindowsProductName,WindowsEditionId,WindowsVersion,OSDisplayVersion
List Available Windows Editions in WIM File
Get-WindowsImage -ImagePath "D:\sources\install.wim"
Run DISM with Local Source
DISM /Online /Cleanup-Image /RestoreHealth /Source:WIM:D:\sources\install.wim:6 /LimitAccess
D:
with the drive letter of your Windows installation media.If using an ESD file:
DISM /Online /Cleanup-Image /RestoreHealth /Source:ESD:D:\sources\install.esd:6 /LimitAccess
In Windows 10/11 and Windows Server 2016+, PowerShell offers an equivalent command.
Repair-WindowsImage -Online -ScanHealth
Repair-WindowsImage -Online -RestoreHealth
If using a local WIM file, specify the source:
Repair-WindowsImage -Online -RestoreHealth -Source F:\sources\install.wim:5 -LimitAccess
If Windows fails to boot, use DISM in offline mode.
C:
):
diskpart
list volume
exit
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
Dism /Image:C:\ /Cleanup-Image /RestoreHealth /Source:D:\sources\install.wim
C:\
with your Windows partition.D:\
with your installation media drive.If the target drive has insufficient space, specify a scratch directory:
Dism /Image:C:\ /Cleanup-Image /RestoreHealth /Source:D:\sources\install.wim /ScratchDir:F:\scratch
Command | Description |
---|---|
DISM /Add-Package |
Installs MSU/CAB updates. |
DISM /Get-Drivers |
Lists installed drivers. |
DISM /Add-Driver |
Injects drivers into Windows image. |
DISM /Enable-Feature /Disable-Feature |
Manages Windows features. |
DISM /StartComponentCleanup |
Cleans up the Component Store (WinSxS). |
DISM /Set-Edition |
Upgrades Windows from evaluation to full version. |
Using DISM and SFC together allows you to diagnose and repair Windows system file corruption efficiently. If your system remains unstable even after these repairs, consider restoring from a backup or reinstalling Windows.