Post

Use DISM To Maintain/Repair A Windows Installation

Use this command to restore the health of your Windows install

1
DISM /Online /Cleanup-Image /RestoreHealth

Use this command to restore the health of your Windows install while offline. You will have mount an image or use a bootable flashdrive.

1
DISM /Online /Cleanup-Image /RestoreHealth /Source:D:\Sources\install.esd

Analyze the component store to see what can be removed

1
DISM /Online /Cleanup-Image /AnalyzeComponentStore

Cleanup old files

1
DISM /Online /Cleanup-Image /StartComponentCleanup

Reset the base to cleanup even further

1
DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBase
This post is licensed under CC BY 4.0 by the author.