You can offline service an image using DISM and enable/disable a feature on the mounted ones. In this short article, let us see on how we can do the same.
To do these operations, you should mount the Wim image first. If you arent aware on the steps, then do check this article!
DISM image servicing – VHD Support
- Same servicing support as for WIM images. (Just replace the /MountDir folder with the virtual harddisk Drive Letter!)
- Must use separate tools like diskpart to attach the VHD image for servicing
- All updates are committed to the VHD image right after completion of the servicing operation
First list all the features available on the mounted Wim Image. To get this information use the command, dism /Image:<MountedDir> /get-features
Now for the demo purpose, let me enable the “ServerMigration” Feature. To do the same, you will need to use the command line dism /image<mountedDir> /enable-feature /featureName:<featurename>
Now when you list the features again, you will see that, this feature is enabled!
Here are the other Package and Feature Servicing Commands
/Add-Package – Adds packages to the image.
/Remove-Package – Removes packages from the image.
/Enable-Feature – Enables a specific feature in the image.
/Disable-Feature – Disables a specific feature in the image.
/Get-Packages – Displays information about all packages in the image.
/Get-PackageInfo – Displays information about a specific package.
/Get-Features – Displays information about all features in a package.
/Get-FeatureInfo – Displays information about a specific feature.
/Cleanup-Image – Performs cleanup and recovery operations on the image.
You would also be interested in reading this –
Leave a Reply