Enabling features from the command line

by Mitch Tulloch [Published on 2 Aug. 2012 / Last Updated on 2 Aug. 2012]

How to enable Windows features from the command line.

In Windows 7 and Windows Server 2008 you can enable or disable features from the command prompt on a running Windows installation.  For example, let's say you want to enable the Windows Search feature on a Windows 7 computer to provide content indexing, property caching, and search results for files, e-mail, and other content.  You can do this by running the following command:

dism /online /enable-feature /FeatureName:SearchEngine-Client-Package

To see a list of features and whether they are enabled or disabled on a computer, use this command:

dism /online /Get-Features

To see detailed information concerning a specific feature like Windows Search, use this command:

dism /online /Get-FeatureInfo /FeatureName:SearchEngine-Client-Package

To disable the Windows Search feature if it is no longer needed, use this command:

dism /online /disable-feature /FeatureName:SearchEngine-Client-Package

Note that cmd.exe must be running with admin privileges in order to use Dism.exe.

Mitch Tulloch is a seven-time recipient of the Microsoft Most Valuable Professional (MVP) award and widely recognized expert on Windows administration, deployment and virtualization. For more tips by Mitch you can follow him on Twitter or friend him on Facebook.

 

See Also

Featured Links