Get-SPFeature
Returns the SharePoint Features based on a given scope.
Syntax
FarmFeatures
Get-SPFeature
[[-Identity] <SPFeatureDefinitionPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>]
[-Farm]
[-Limit <String>]
[<CommonParameters>]
SiteFeatures
Get-SPFeature
[[-Identity] <SPFeatureDefinitionPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>]
[-Limit <String>]
[-Site <SPSitePipeBind>]
[-Sandboxed]
[<CommonParameters>]
WebFeatures
Get-SPFeature
[[-Identity] <SPFeatureDefinitionPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>]
[-Limit <String>]
[-Web <SPWebPipeBind>]
[<CommonParameters>]
WebApplicationFeatures
Get-SPFeature
[[-Identity] <SPFeatureDefinitionPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>]
[-Limit <String>]
[-WebApplication <SPWebApplicationPipeBind>]
[<CommonParameters>]
FarmFeatureDefinitions
Get-SPFeature
[[-Identity] <SPFeatureDefinitionPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>]
[-Limit <String>]
[-CompatibilityLevel <Int32>]
[<CommonParameters>]
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 https://go.microsoft.com/fwlink/?LinkID=18781.
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.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831.
Examples
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 https://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 https://somesite.
Parameters
-AssignmentCollection
Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
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.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Parameter properties
Type: | SPAssignmentCollection |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-CompatibilityLevel
Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
Specifies the version of templates to use when creating a new SPSite object. This value sets the initial CompatibilityLevel value for the site collection. When this parameter is not specified, the CompatibilityLevel will default to the highest possible version for the web application depending on the CompatibilityRange setting.
Parameter properties
Type: | Int32 |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
FarmFeatureDefinitions
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Farm
Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
Specifies that if this parameter is used, only enabled farm Features are displayed.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
FarmFeatures
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Identity
Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
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.
Parameter properties
Type: | SPFeatureDefinitionPipeBind |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 1 |
Mandatory: | False |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Limit
Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
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 properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Sandboxed
Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
Specifies to retrieve Sandbox features.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
SiteFeatures
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Site
Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
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 https://server_name .
Parameter properties
Type: | SPSitePipeBind |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
SiteFeatures
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Web
Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
Specifies the URL or GUID of the Web.
The type must be a valid URL, in the form https://server_name , or a GUID, in the form 1234-5678-9876-0987.
Parameter properties
Type: | SPWebPipeBind |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
WebFeatures
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-WebApplication
Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
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 https://server_name .
Parameter properties
Type: | SPWebApplicationPipeBind |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
WebApplicationFeatures
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.