Q. How do I enable or disable a feature in the OS from the command line using the Deployment Image Servicing and Management (DISM) tool?

John Savill

January 5, 2011

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. Windows 7 has all the files for features copied onto the system when the OS is installed. They're just enabled during the feature install process when they're needed, without any file copy operations from media being required. You can enable or disable features for your online OS or an offline-mounted image (WIM or VHD) using the /disable-feature and /enable-feature switches.

I'm going to disable Purble Place for my online OS. Tf it was an offline-mounted image, you'd would replace /online with /image:.

C:>dism /online /get-featureinfo /featurename:PurblePlace

 Deployment Image Servicing and Management tool
 Version: 6.1.7600.16385

 Image Version: 6.1.7600.16385

 Feature Information:

 Feature Name : PurblePlace
 Display Name : Purble Place
 Description : Purble Place
 Restart Required : Possible
 State : Enabled

 Custom Properties:

 (No custom properties found)

 The operation completed successfully.
C:>dism /online /disable-feature /featurename:PurblePlace

 Deployment Image Servicing and Management tool
 Version: 6.1.7600.16385

 Image Version: 6.1.7600.16385

 Disabling feature(s)
 \[=====================
100.0%
=====================\]
 The operation completed successfully.

To enable the feature instead, just replace /disable-feature with /enable-feature.

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