Skip to content

Instantly share code, notes, and snippets.

@valorad
Created June 5, 2022 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save valorad/906f83ae2aeef15a608e3e51524ca9c9 to your computer and use it in GitHub Desktop.
Save valorad/906f83ae2aeef15a608e3e51524ca9c9 to your computer and use it in GitHub Desktop.
dism repair image

online (meaning repairing current running system):

Admin powershell:

Repair-WindowsImage -Online -ScanHealth
Repair-WindowsImage -Online -RestoreHealth

offline:

Preparation:

Installation media Target system drive to repair temp drive with at least 1 GB free space

Begin:

Installation media (E:) Target system drive (C:) temp drive(D:)

mkdir D:\temp

Dism /image:C:\ /Cleanup-Image /RestoreHealth /ScratchDir:D:\temp /Source:E:\sources\install.wim

Ref: http://woshub.com/dism-cleanup-image-restorehealth/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment