Skip to content
Tech Shizz Logo

An Engineers Blog

  • TechShizz
  • blog

Using DISM to Add Drivers / Packages / Install Roles and Features in a .wim file

Posted on February 23, 2021 By rich No Comments on Using DISM to Add Drivers / Packages / Install Roles and Features in a .wim file

The following reference folders that contain the relevent drivers/packages. Ensure you have the driver/package in the right location e.g. .drivers

### DISM - Deployment Image Servicing and Management Command-line Utility ###
## Desktop Experience & Server Core ##
# display help
dism /?
# view images within a .wim
dism /get-imageinfo /imagefile:.imagesinstall.wim
# mount server core datacenter image
dism /mount-image /imagefile:.imagesinstall.wim /index:3 /mountdir:.mount
# add drivers (.inf)
dism /image:.mount /get-drivers
dism /image:.mount /add-driver /driver:.drivers
dism /image:.mount /remove-driver /driver:.driversiaStorAC.inf
# add patches, hotfixes, and updates (.msu or .cab)
dism /image:.mount /get-packages
dism /image:.mount /add-package /packagepath:.updates
dism /image:.mount /remove-package /packagepath:.updateswindows10.0-kb3150513.msu
# install roles and features
dism /image:.mount /get-features
dism /image:.mount /get-featureinfo /featurename:web-server
dism /image:.mount /enable-feature /featurename:web-server /all
dism /image:.mount /disable-feature /featurename:web-server
# dismount and commit all changes
dism /unmount-image /mountdir:.mount /commit

## Nano Server ##
# view nano server images
dism /get-imageinfo /imagefile:.imagesnanoserver.wim
# mount nano server datacenter image
dism /mount-image /imagefile:.imagesnanoserver.wim /index:2 /mountdir:.mount
# add nano server package
dism /image:.mount /add-package /package:d:nanoserverpackagesmicrosoft-nanoserver-containers-package.cab
# dismount and commit all changes
dism /unmount-image /mountdir:.mount /discard

 

Post navigation

❮ Previous Post: HTTP Error 503 when Single Sin On redirecting to ADFS Server After Re-Enabling Single Sign On
Next Post: Connecting to and Configuring Nano Servers ❯

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Subscribe to our newsletter!

Recent Posts

  • How to implement a lightning-fast ransomware playbook
  • How to achieve defence in depth in your business
  • How to implement a SecOps team phishing response plan
  • How to block an Office 365 Sign-in correctly
  • Microsoft finally patched serious Exchange 0-day over a month old!

Recent Comments

    Archives

    • November 2022
    • July 2021
    • March 2021
    • February 2021

    Categories

    • Cyber Security
    • Uncategorized

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org

    Copyright © 2023 .

    Theme: Oceanly News Dark by ScriptsTown