Run DISM command line To Fix And Repair Windows system Image 2023
DISM (Deployment Image & Servicing Management) is a command-line utility used to repair Windows images, Windows Setup, and Windows PE. Mostly DISM command line is used when sfc/scannow command is unable to repair corrupted or modified system files. Running DISM Command-line Repair the System image And Enable System File Checker Utility To do its job.
When Need to Run the DISM Command line?
When you start getting errors (Especially After the Recent windows 10 21H2 Update) such as Blue Screen of Death (BSOD or applications start crashing or certain Windows 10 features stop working all these are sign of Missing, Damaged, or System File Corruption. And We Recommend To Run System File Checker Utility (sfc /scannow) To Scan And Restore missing corrupted system Files. The SFC utility if found any system file corruption or missing will restore them from a special folder located on %WinDir%\System32\dllcache.
But Some Times you may notice sfc / scannow Results system file checker found some corrupt files but was unable to fix them. Or windows resource protection found corrupt files but was unable to fix some of them etc. To fix this kind of problem We Run the DISM Command line, which Repairs the System Image and allows the System File checker Utility to do its job.
Repair Windows System Image using DISM Command
Now After Understanding about DISM Command-line utility, Use of it, and When we need to Run the DISM Command line. Let’s discuss Different DISM Command line options and How To Run the DISM Command line to Repair the Windows system image and enable the SFC utility To do its job.
Note: We are going to make changes to your computer, we recommend to Create A System Restore point. So that in case things go wrong, and you need to revert back the changes.
There are three main options you can use with DISM to repair the Windows image on your computer, including CheckHealth, ScanHealth, and RestoreHealh
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.
To Run, This opens the Command prompt As administrator Then Type command Bellow and hit Enter key.
Dism /Online /Cleanup-Image /ScanHealth
This will start the scanning process for system image corruption This could take 10-15 minutes.
DISM CheckHealth Command
The /CheckHealth is used to check whether the image has been flagged as corrupted by a failed process and whether the corruption can be repaired. This command doesn’t fix anything, only reports the problems if any.
To Run DISM CheckHealth Command again on Admin Command prompt Type Command below and hit enter to execute the same.
Dism /Online /Cleanup-Image /CheckHealth
Run DISM restore health Command
And 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.
To Run, DISM restore health on Administrator command prompt Type Command Bellow and hit the Enter key.
Dism /Online /Cleanup-Image /RestoreHealth
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.
Run DISM with Source options
To Run DISM with Source options first Download Windows 10 ISO, 32 Bit, Or 64 Bit with the same version and edition of your current version of Windows 10. After complete, 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 form 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.
Face any difficulty while performing the above steps, Or have any queries or Suggestion About this post feel free to discuss on the comments below. Also, Read