Skip navigation

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?

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:<mounted image location>.

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.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish