Use DISM to Manage Windows Images

Use DISM to manage image content.

John Savill

July 4, 2014

1 Min Read
QA

Q: How can I use the Deployment Image Servicing and Management tool to enable a role or feature in a mounted Windows Imaging Format or Virtual Hard Disk?

A: Once a Windows Imaging Format (WIM) or Virtual Hard Disk (VHD) has been mounted, you can use the Deployment Image Servicing and Management (DISM) tool to manage it. The following commands can be useful:

  • Create a folder for the mount:

    Mkdir c:mountwim
  • View images within a WIM file:

    Dism /get-imageinfo /imagefile:"s:OS ImagesWindows Server 2012 R2 Update 1sourcesinstall.wim"
  • Mount a specific image from a WIM file into the created folder:

    Dism /mount-wim /wimfile:"s:OS ImagesWindows Server 2012 R2 Update 1sourcesinstall.wim" /index:4 /mountdir:c:mountwim
  • View all features and their enabled state in the mounted image:

    Dism /image:c:mountwim /get-features (also could do /get-drivers)
  • View all drivers in the mounted image:

    Dism /image:c:mountwim /get-drivers
  • Get feature information for a specific role:

    Dism /image:c:mountwim /get-featureinfo /featurename:file-services
  • Enable a role and all subroles:

    Dism /image:c:mountwim /enable-feature /featurename:file-services –all
  • Unmount a WIM and save the changes (use /discard to not save changes):

    Dism /unmount-wim /mountdir:c:mountwim /commit

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like