Raymond.CC Blog
  • Home
  • Forum
  • Giveaway
  • X-Ray 2.0
  • Contact
  • About
  • I’m Feeling Lucky
Search the site...
You are here: Home » Windows » Add or Remove Windows Features Through the Command Prompt

Add or Remove Windows Features Through the Command Prompt

Updated by HAL9000 - 1 year ago - Windows
3
  • Like
  • +1
  • Tweet
  • Printer Friendly and PDF
dism-features-1

If you didn’t already know, just about all versions of Windows come with a wide array of extra features installed which most people don’t even know about, or simply have no need to use them. From things like the Windows and internet games, to the indexing and search services and the XPS viewer. There are a number of features which most people, even power users, don’t have a great deal of use for. It does therefore, make a bit of sense to turn these Windows features off if they are never going to be used. They can always be turned on again at a later date if required.

The easiest way to do this and a way which is easily achievable in Windows Vista and 7, is by going to the Control Panel, clicking on ‘Programs and features’ and selecting ‘Turn Windows feature on or off’. Windows XP users can do the same by going to ‘Add or Remove Programs’ and ‘Add/Remove Windows Components’. This is fine and not difficult for the majority of people, but for the more technically minded users who are comfortable using more manual methods, there is quite an easy way to do the same thing via the Command Prompt. This obviously has an advantage in that these features can be added into scripts and batch operations.

Unfortunately though, this option is only available natively in Windows 7. It is called the Deployment Image Servicing and Management (DISM) command and is quite powerful for performing a number of tasks and not just enabling or disabling the Windows features. Although the Windows Features component is what the focus is here, DISM is also designed in a large part for manipulating Windows images (WIM’s) and injecting update packages as well as applying unattended functions to an image which may be covered in a later article.

It’s no surprise that the command prompt needs to be run with Administrator rights so don’t forget to right click and ‘Run as Administrator’. You will get an ‘Error: 740’ if you forget!

Type ‘Dism /online /get-features | more’ to get the full list of available features and whether they are currently enabled or disabled. A redirection similar to ‘>c:\dism_Features.txt’ can be appended to output the list to a text file.

Add or Remove Windows Features Through the Command Prompt

Typing ‘Dism /online /Get-FeatureInfo /FeatureName:*selected-feature*’ will give more details about the selected feature and whether it might need a system reboot after altering. NOTE: When typing in the feature name, it is case sensitive, ‘hearts’ won’t work, ‘Hearts’ will.

Add or Remove Windows Features Through the Command Prompt

Use ‘Dism /online /disable-feature /FeatureName:*selected-feature*’ to disable a selected feature. Enabling a feature again is simply changing ‘/disable-feature’ to ‘/enable-feature’ in the command. Performing several operations at once is done by appending another ‘ /FeatureName:*selected-feature*’ entry.

Add or Remove Windows Features Through the Command Prompt

The Deployment Image Servicing and Management (DISM) tool can be extremely powerful and used for an array of tasks on the local machine or for deploying custom made Windows 7 images. For some more technical reading about what it can do, there is a reference document over at Microsoft Technet.

You may also like:

Add Some Useful Buttons to the Windows 7 Explorer ToolbarAdd Some Useful Buttons to the Windows 7 Explorer ToolbarIncrease the Usefulness of the Windows Open With FeatureIncrease the Usefulness of the Windows Open With FeatureTimestamp Ping with hrPINGTimestamp Ping with hrPINGHow To Perform a Repair Install of Windows XPHow To Perform a Repair Install of Windows XP

3 comments on “Add or Remove Windows Features Through the Command Prompt”

  1. Pankaj Patel says:
    1 year ago

    This post informs the advanced windows user to use windows like Linux i.e. Power of Command Line!

    Reply
  2. XPMan says:
    1 year ago

    pkgmgr d/n work under XP SP3

    Reply
  3. ayak says:
    1 year ago

    Thanks for share
    also you can use pkgmgr for command line add and remove system packages

    Reply

Leave a Reply Cancel reply

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

Recently Updated

  • no fake av icon

    6 Ways to Kill and Remove Fake Antivirus Rogue Software

  • abort shutdown

    4 Tools to Prevent, Cancel and Abort a Windows System Shutdown or Restart when Applications are Running

  • screen brightness icon

    10 Tools to Adjust Laptop and Monitor Brightness, Gamma or Contrast Levels

New Articles

  • task manager replacement icon

    Memory Usage Test to See Which is the Lightest Antivirus Software

  • kaspersky antivirus 2013 icon

    Activate Free Kaspersky Anti-Virus 2013 ROG with 1 Year License

  • remote access software

    Top 8 Remote Access Software for Providing Online Support

Popular Posts

  • Top 10 FREE Data Recovery Software

    Top 10 FREE Data Recovery Software

  • How to Hack Into a Windows XP Computer Without Changing Password

    How to Hack Into a Windows XP Computer Without Changing Password

  • 10 Free Software to Mount CD or DVD ISO Image File as Virtual Drives

    10 Free Software to Mount CD or DVD ISO Image File as Virtual Drives

Recommend on Google
Follow @raymond_cc
Subscribe Youtube »
(c) 2013 Raymond.CC Blog
  • Disclaimer
  • Disclosure
  • Privacy Policy
  • Terms of Use
  • Sitemap