Remove-WindowsFeature

Remove specified roles, role services, and features from a computer running Windows Server 2008 R2.
For Windows 2012 R2 and greater, use Uninstall-WindowsFeature.

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

Key
   -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.

   -WhatIf
       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
       Restart the computer automatically when removal is complete,
       if restarting is required by the roles or features removed.

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

Examples

Remove both Telnet Server and Telnet Client:

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

Remove all Web features, including dependencies:

PS C:\> 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 Cmdlets:

Add-WindowsFeature - Install roles, role services, and features.
Get-WindowsFeature - Retrieve roles, role services, and features.
Remove-WindowsCapability - Uninstall a Windows capability package from an image.
Uninstall-WindowsFeature - Uninstall/remove roles, role services, and features (2012 R2+)


 
Copyright © 1999-2021 SS64.com
Some rights reserved