DISM and SFC
All commands require an admin CMD or Powershell
Using SFC
SFC is a basic command to check and repair minor OS corruption.
In CMD or Powershell run:
sfc /scannow
Using DISM without a source
DISM is a larger command, that can do much more to repair broken parts of an OS.
In CMD or Powershell run:
-
To check for issues
DISM /Online /Cleanup-Image /CheckHealth
-
To check for deeper issues
DISM /Online /Cleanup-Image /ScanHealth
-
To resolve issues
DISM /Online /Cleanup-Image /RestoreHealth
Using DISM with a source WIM (from an ISO)
DISM normally uses an Online source to repair your system, sometimes this leads to errors. You can use a Windows 10 ISO to get a 'clean' source locally. Download the ISO using the Windows media creation tool
Double click the downloaded ISO to mount it and note its drive letter in 'This PC'
In CMD or Powershell run:
-
Repair issues with your local source
DISM /Online /Cleanup-Image /RestoreHealth /Source:F:\Sources\install.wim
Using Indices
For Windows server you may need to look into using a specifc index of the WIM
-
Check a WIMs indices with
- Powershell
Get-WindowsImage -ImagePath F:\sources\install.wim
- CMD
dism /Get-WimInfo /WimFile:F:\sources\install.wim
- Powershell
-
Use the index to run a repair against your specific OS type
DISM /Online /Cleanup-Image /RestoreHealth /Source:wim:F:\Sources\install.wim:1