Get-SPFeature
Published: July 16, 2012
Applies to: SharePoint Foundation 2013 | SharePoint Server 2013 Enterprise
Returns the SharePoint Features based on a given scope.
Get-SPFeature [[-Identity] <SPFeatureDefinitionPipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-Limit <String>]
Get-SPFeature [[-Identity] <SPFeatureDefinitionPipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-Farm <SwitchParameter>] [-Limit <String>]
Get-SPFeature [[-Identity] <SPFeatureDefinitionPipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-Limit <String>] [-Sandboxed <SwitchParameter>] [-Site <SPSitePipeBind>]
Get-SPFeature [[-Identity] <SPFeatureDefinitionPipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-Limit <String>] [-Web <SPWebPipeBind>]
Get-SPFeature [[-Identity] <SPFeatureDefinitionPipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-Limit <String>] [-WebApplication <SPWebApplicationPipeBind>]
Get-SPFeature [[-Identity] <SPFeatureDefinitionPipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-CompatibilityLevel <Int32>] [-Limit <String>]
Parameters
1| Parameter | Required | Type | Description | ||
| Identity | Optional | Microsoft.SharePoint.PowerShell.SPFeatureDefinitionPipeBind | Specifies the name of the Feature to retrieve. The type must be the full or partial name, in the form Feature1, or a GUID, in the form 1234-4567-9879, of the Feature to get . | ||
| AssignmentCollection | Optional | Microsoft.SharePoint.PowerShell.SPAssignmentCollection | Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.
| ||
| Limit | Optional | System.String | Limits the display results. If "All" is specified, all Features are displayed. The type must be a valid number greater than 0. The default value is 200. |
| Parameter | Required | Type | Description | ||
| Identity | Optional | Microsoft.SharePoint.PowerShell.SPFeatureDefinitionPipeBind | Specifies the name of the Feature to retrieve. The type must be the full or partial name, in the form Feature1, or a GUID, in the form 1234-4567-9879, of the Feature to get . | ||
| AssignmentCollection | Optional | Microsoft.SharePoint.PowerShell.SPAssignmentCollection | Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.
| ||
| Farm | Optional | System.Management.Automation.SwitchParameter | Specifies that if this parameter is used, only enabled farm Features are displayed. | ||
| Limit | Optional | System.String | Limits the display results. If "All" is specified, all Features are displayed. The type must be a valid number greater than 0. The default value is 200. |
| Parameter | Required | Type | Description | ||
| Identity | Optional | Microsoft.SharePoint.PowerShell.SPFeatureDefinitionPipeBind | Specifies the name of the Feature to retrieve. The type must be the full or partial name, in the form Feature1, or a GUID, in the form 1234-4567-9879, of the Feature to get . | ||
| AssignmentCollection | Optional | Microsoft.SharePoint.PowerShell.SPAssignmentCollection | Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.
| ||
| Limit | Optional | System.String | Limits the display results. If "All" is specified, all Features are displayed. The type must be a valid number greater than 0. The default value is 200. | ||
| Site | Optional | Microsoft.SharePoint.PowerShell.SPSitePipeBind | Specifies the name of the site collection from which to get enabled Features. The type must be a valid URL for a site collection, in the form http://server_name . |
| Parameter | Required | Type | Description | ||
| Identity | Optional | Microsoft.SharePoint.PowerShell.SPFeatureDefinitionPipeBind | Specifies the name of the Feature to retrieve. The type must be the full or partial name, in the form Feature1, or a GUID, in the form 1234-4567-9879, of the Feature to get . | ||
| AssignmentCollection | Optional | Microsoft.SharePoint.PowerShell.SPAssignmentCollection | Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.
| ||
| Limit | Optional | System.String | Limits the display results. If "All" is specified, all Features are displayed. The type must be a valid number greater than 0. The default value is 200. | ||
| Web | Optional | Microsoft.SharePoint.PowerShell.SPWebPipeBind | Specifies the URL or GUID of the Web. The type must be a valid URL, in the form http://server_name , or a GUID, in the form 1234-5678-9876-0987. |
| Parameter | Required | Type | Description | ||
| Identity | Optional | Microsoft.SharePoint.PowerShell.SPFeatureDefinitionPipeBind | Specifies the name of the Feature to retrieve. The type must be the full or partial name, in the form Feature1, or a GUID, in the form 1234-4567-9879, of the Feature to get . | ||
| AssignmentCollection | Optional | Microsoft.SharePoint.PowerShell.SPAssignmentCollection | Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.
| ||
| Limit | Optional | System.String | Limits the display results. If "All" is specified, all Features are displayed. The type must be a valid number greater than 0. The default value is 200. | ||
| Web | Optional | Microsoft.SharePoint.PowerShell.SPWebPipeBind | Specifies the URL or GUID of the Web. The type must be a valid URL, in the form http://server_name , or a GUID, in the form 1234-5678-9876-0987. | ||
| WebApplication | Optional | Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind | Specifies the name of the Web application from which to get enabled Features. The type must be a valid URL to the Web application in the form http://server_name . |
| Parameter | Required | Type | Description | ||
| Identity | Optional | Microsoft.SharePoint.PowerShell.SPFeatureDefinitionPipeBind | Specifies the name of the Feature to retrieve. The type must be the full or partial name, in the form Feature1, or a GUID, in the form 1234-4567-9879, of the Feature to get . | ||
| AssignmentCollection | Optional | Microsoft.SharePoint.PowerShell.SPAssignmentCollection | Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.
| ||
| Limit | Optional | System.String | Limits the display results. If "All" is specified, all Features are displayed. The type must be a valid number greater than 0. The default value is 200. |
Detailed Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet Parameter Sets.
All parameter sets take the Identity parameter, which can be either the relative path of the SharePoint Feature (considered the feature name) or the GUID of a Feature definition. If the Identity parameter is provided, the cmdlets attempt to find the given Feature definition or instance for the given scope. If no parameters are specified, all installed features are returned.
The Get-SPFeature cmdlet behaves differently at each scope, returning the enabled Features at each level. If no scope is provided, all installed Features are returned.
Input Types
Return Types
--------------EXAMPLE 1-----------------
Get-SPFeature –Limit ALL | Where-Object {$_.Scope –eq "SITE"}
This example returns a list of all installed SITE scoped Features.
--------------EXAMPLE 2-----------------
Get-SPSite http://somesite | Get-SPWeb –Limit ALL |%{ Get-SPFeature –Web $_ } | Select DisplayName,ID -Unique
This example returns the name and identifier (ID) of each uniquely enabled Feature on every SPWeb object in the site collection at http://somesite.
Change History
| Date | Description |
|---|---|
| July 16, 2012 | Initial publication |

Note: