Get-WindowsFeature
Applies To: Windows Server 2008 R2, Windows Storage Server 2008 R2
Get-WindowsFeature
The Get-WindowsFeature cmdlet allows you to retrieve information about roles, role services, and features that are available on a computer that is running Windows Server 2008 R2.
This topic describes the version of Get-WindowsFeature that runs on Windows Server 2008 R2. For information about the version of Get-WindowsFeature that is available with Windows Server 2012, see the following topic: http://technet.microsoft.com/library/jj205469(v=wps.620).aspx. For information about the version of Get-WindowsFeature that is available with Windows Server 2012 R2, see the following topic: http://technet.microsoft.com/library/jj205469(v=wps.630).aspx
Syntax
Get-WindowsFeature [[-Name] <string[]>] [-logPath <string>] [<CommonParameters>]
Name
logPath
Detailed Description
The Get-WindowsFeature cmdlet allows you to retrieve information about roles, role services, and features that are available on a computer that is running Windows Server 2008 R2. The cmdlet results display both those Windows features that are already installed on the computer and those that are available to install.
Parameters
Name
Specifies the command IDs of roles, role services, or features you want the Get-WindowsFeature cmdlet to return information about. 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.
Default Value:
Data Type:
Attributes
| Name | Value | PSMAML Attribute |
|---|---|---|
Required? |
false |
required |
Variable Length? |
variableLength |
|
Accept wildcard characters? |
true |
globbing |
Accept Pipeline Input? |
true (ByValue) |
pipelineInput |
Position? |
1 |
position |
Value Attributes
| Name | Value | PSMAML Attribute |
|---|---|---|
Required? |
true |
required |
Variable Length? |
variableLength |
logPath
Specifies a name and location for a log file, other than the default, %windir%\logs\servermanager.log. Add this parameter if you want the results of the Get-WindowsFeature cmdlet to be stored in a log.
Default Value:
Data Type:
Attributes
| Name | Value | PSMAML Attribute |
|---|---|---|
Required? |
false |
required |
Variable Length? |
variableLength |
|
Accept wildcard characters? |
false |
globbing |
Accept Pipeline Input? |
false |
pipelineInput |
Position? |
named |
position |
Value Attributes
| Name | Value | PSMAML Attribute |
|---|---|---|
Required? |
true |
required |
Variable Length? |
variableLength |
Input Type
string[]
Array of strings.
Return Type
Microsoft.Windows.ServerManager.Commands.Feature(s)
Feature object(s)
Examples
-------- Example 1 ----------
Command Prompt:
Get-WindowsFeature AD*,Web*
Returns a list of features with Command ID that starts with AD or Web.
-------- Example 2 ----------
Command Prompt:
Get-WindowsFeature
Get all the Windows features available on the computer.