DISM : Misc. WIM Management Commands

DISM.exe (Deployment Image Servicing and Management) is a command-line tool that can be used to service a Windows image or to prepare a Windows Preinstallation Environment (Windows PE) image.  DISM can be used to service a Windows image (.wim) or a virtual hard disk (.vhd or .vhdx).

Clean old mountpoints
• Dism /cleanup-wim

• Dism /Mount-Image /ImageFile:C:\DISM\myimage.wim /index:1 /MountDir:C:\DISM\offline

• Dism /Add-Package /Image:C:\test\offline\Windows /PackagePath:C:\MSU\Windows10-KBxxxxxxx-x64.msu /LogPath:AddPackage.log

Add Driver
• DISM /Image:C:\test\offline /Add-Driver /Driver:C:\test\PS2x64 /recurse
• DISM /Image:C:\test\offline /Add-Driver /Driver:C:\test\PS2x64\.inf

• Dism /unmount-image /mountdir:c:\test\offline /commit

Enable Windows Feature
• DISM /Image:mnt /Enable-Feature /featurename:WCF-HTTP-Activation /All /Source:E:\sources\sxs
• DISM /Image:c:\test\W10 /enable-feature /featurename:NetFx3 /source:c:\test\sxs

You can find many other uses for dism.exe at https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/dism-image-management-command-line-options-s14

Information about equivalent PowerShell commands can be found here :-

Related posts

Leave a Comment