Remove specified roles, role services, and features from a computer that is running Windows Server 2008 R2.

      Remove-WindowsFeature [-Name] string[] [-logPath string]
         [-WhatIf] [-Restart] [-Concurrent]  [CommonParameters]

   -Name string
       The command IDs of roles, role services, or features to remove.
       Alternatively, an array of Feature objects will also be accepted.
       You can find a list of command IDs for all roles, role services, and features in the
       topic "Overview of Server Manager Commands" in the Server Manager Help.

   -logPath string
       The name and location of a log file, other than the default, %windir%\logs\ServerManager.log.

       Describe what would happen if you executed the command,  without actually
       executing the command. This will also display any Windows features that
       would be removed due to dependencies.

       Restart the computer automatically when removal is complete,
       if restarting is required by the roles or features removed.

       Allow concurrent instances of Add-WindowsFeature or Remove-WindowsFeature
       to run at the same time.

       -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable,
       -OutBuffer -OutVariable.


Remove both Telnet Server and Telnet Client:

C:\PS> Remove-WindowsFeature Telnet-Server,Telnet-Client

Remove all Web features, including dependencies:

C:\PS> Get-WindowsFeature Web-* | Remove-WindowsFeature

"No amount of time can erase the memory of a good cat, and no amount of masking tape can ever totally remove his fur from your couch" ~ Leo F. Buscaglia

Related PowerShell Commands:

Add-WindowsFeature - Install roles, role services, and features
Get-WindowsFeature - Retrieve roles, role services, and features

Copyright © 1999-2019
Some rights reserved