DISM

Deployment Image Servicing and Management.

Frees up disk space and optimizes the system.

Open command prompt as an administrator and wait for completion.

> Dism.exe /online /Cleanup-Image /StartComponentCleanup

Repair Windows image

Open command prompt as an administrator.

> sfc /scannnow
> dism /Online /Cleanup-Image /CheckHealth
> dism /Online /Cleanup-Image /ScanHealth
> dism /Online /Cleanup-image /RestoreHealth

Explanation:

System file checker

> SFC /scannow

This option performs a more advanced scan to determine if the image has any problems.

> dism /Online /Cleanup-Image /ScanHealth

Quickly determine if there are any corruptions inside the local image, but the option won’t perform any repairs.

> dism /Online /Cleanup-Image /CheckHealth

Run an advanced scan and repair problems automatically.

> dism /Online /Cleanup-image /RestoreHealth

List all of the features available in the operating system.

> dism /Image:C:\test\offline /Get-Features
> dism /online /Get-Features
> dism /online /Enable-Feature /FeatureName:XXX
> dism /online /Disable-Feature /FeatureName:XXX

Displays the edition of the specified image.

> dism /Image:C:\test\offline /Get-CurrentEdition
> dism /online /Get-CurrentEdition

Displays a list of Windows editions that an image can be changed to.

> dism /Image:C:\test\offline /Get-TargetEditions
> dism /Online /Get-TargetEditions

Change an Windows image to a higher edition.

> dism /Image:C:\test\offline /Set-Edition:Ultimate
> dism /online /Set-Edition:Datacenter /ProductKey:12345-67890-12345-67890-12345

Backup third party device drivers.

> dism /online /export-driver /destination:C:\drivers-backup

Install all of the drivers from a folder and all its subfolders.

> dism /online /Add-Driver /Driver:D:\DriversBackup /Recurse

Repair an offline image using a mounted image as a repair source.

> dism /Image:C:\offline /Cleanup-Image /RestoreHealth /Source:c:\test\mount\windows

Repair an online image using some of your own sources instead of windows update.

> dism /Online /Cleanup-Image /RestoreHealth /Source:c:\test\mount\windows /LimitAccess

Notes:

> dism /Capture-Image /ImageFile:D:\BF\Win10Pro.wim /CaptureDir:C:\ /Name:Win8Pro-1 /Description:00-00-00
> dism /Append-Image /ImageFile:D:\BF\Win10Pro.wim /CaptureDir:C:\ /Name:Win8Pro-2 /Description:00-00-00
Licensed under CC BY-NC-SA 4.0
comments powered by Disqus