Through this blog, it is my effort to share experiences with the community and make the journey enjoyable.

Wednesday, January 13, 2010

SharePoint 2010 Management Shell - Features CmdLets

The SharePoint Management Shell in SharePoint Foundation 2010 provides an extensive set of Windows PowerShell cmdlets that make development, deployment, and administration of SharePoint 2010 easier and more efficient. Management Shell contains the Powershell cmdlets for SharePoint, by using this we control and manage the SharePoint operations like we done in STSADM command.

Powershell cmdlets for managing SharePoint Features -

PS C:\Users\Administrator> get-command *feature*

CommandType Name Defintion

----------- -------- ------------------------------------

Cmdlet Disable-SPFeature Disable-SPFeature [-Identity...

Cmdlet Enable-SPFeature Enable-SPFeature [-Identity]...

Cmdlet Get-SPFeature Get-SPFeature [[-Identity] <...

Cmdlet Install-SPFeature Install-SPFeature [-Path] <S...

Cmdlet Uninstall-SPFeature Uninstall-SPFeature [-Identi...

Help is available for these SharePoint 2010-specific cmdlets in Windows PowerShell. Type get-help and then type the name of the cmdlet. For example, to find help about SPServiceApplication, type get-help get-SPServiceApplication.

PS C:\Users\Administrator> get-help get-spfeature




Returns the SharePoint Features based on a given scope.


Get-SPFeature [-Identity <SPFeatureDefinitionPipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-Limit <String>] [<CommonParameters>]

Get-SPFeature [-Identity <SPFeatureDefinitionPipeBind>] [-AssignmentCollect ion <SPAssignmentCollection>] [-Farm <SwitchParameter>] [-Limit <String>] [ <CommonParameters>]

Get-SPFeature [-Identity <SPFeatureDefinitionPipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-Limit <String>] [-Sandboxed <SwitchParameter>] [-Site <SPSitePipeBind>] [<CommonParameters>]

Get-SPFeature [-Identity <SPFeatureDefinitionPipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-Limit <String>] [-Web <SPWebPipeBind>] [<CommonParameters>]

Get-SPFeature [-Identity <SPFeatureDefinitionPipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-Limit <String>] [-WebApplication <SPWebApplicationPipeBind>] [<CommonParameters>]


All SPFeature 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.

get-spfeature (returns all the installed Feature definitions in the farm )

get-spfeature -farm ( returns all the enabled Feature in the farm)

get-spfeature -webapplication (returns all enabled the Features in the Webapplication)

get-spfeature -site (returns all the enabled Features on the site <<both full trusted and particially trusted code>>)

get-spfeature -site -sandboxed (returns all installed the ptc Feature definitions on the site)

get-spfeature -web (returns all the enabled Features in the Web)


For more information, type: "get-help Get-SPFeature -detailed".

For technical information, type: "get-help Get-SPFeature -full".



Post a Comment

Search This Blog


The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway. All posts are provided "AS IS" with no warranties, and confers no rights. In addition, my thoughts and opinions often change, and as a weblog is intended to provide a semi-permanent point in time snapshot you should not consider out of date posts to reflect my current thoughts and opinions.

Popular Posts

Total Pageviews