powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Remove-WindowsFeature



NAME
Remove-WindowsFeature

SYNOPSIS
The Remove-WindowsFeature cmdlet allows you to remove specified roles,
role services, and features from a computer that is running Windows
Server 2008 R2.

SYNTAX
Remove-WindowsFeature [-Name] [-logPath ] [-WhatIf] [-Restart] [-Concurrent] [
]


DESCRIPTION
The Remove-WindowsFeature cmdlet allows you to remove specified roles,
role services, and features from a computer that is running Windows
Server 2008 R2. The Remove-WindowsFeature cmdlet functions similarly
to the Remove Roles Wizard and Remove Features Wizard that you can start
from the Server Manager UI. As in those wizards, you can remove more than
one role, role service, or feature per session.

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.


PARAMETERS
-Name
Specifies the command IDs of roles, role services, or features you
want to remove by using the Remove-WindowsFeature cmdlet.
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.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-logPath
Specifies a name and location for the log file, other than the default,
%windir%\logs\ServerManager.log.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf
Displays any operations that are specified for the
Remove-WindowsFeature cmdlet; displays the names of all roles, role
services, or features that are removed.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

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

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Concurrent
Allows concurrent instances of the Server Manager Add-WindowsFeature
or Remove-WindowsFeature cmdlets to be running at the same time.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS
string[]


OUTPUTS
Microsoft.Windows.ServerManager.Commands.FeatureOperationResult


NOTES
The -Confirm parameter is not used by this cmdlet, because multiple roles, role services, or features can be remove
d in a single session.



-------- Example 1 ----------

Remove-WindowsFeature Telnet-Server,Telnet-Client


Remove both Telnet Server and Telnet Client.


-------- Example 2 ----------

Get-WindowsFeature Web-* | Remove-WindowsFeature


Remove all Web features and any other Windows feature(s) that depend on
them.



RELATED LINKS
{Get-WindowsFeature, Add-WindowsFeature}