PowerShell To List Feature Definitions

Get-spfeature gets the SharePoint features based on a given scope.

This cmdlet behaves differently at each scope, getting the enabled Features at each level. There are 4 levels of scope

· Farm

· WebApplication

· Site (Site Collection)

· Web (Site)

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

get-spfeature -webapplication http://server (gets all enabled the Features in the Web application)

get-spfeature -site http://server/sites/IT (gets all the enabled Features on the site collection)

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

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

If no scope is provided, all installed Features are returned.

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

clip_image002

The list will scroll by so use any of the following commands

get-spfeature | more (using more command stops the list from scrolling to end)

get-spfeature |select displayname, scope (using select displayname, scope will remove the id column)

get-spfeature | sort scope | select displayname, scope | more (sort scope command will sort the feature based on their scope)

clip_image003

get-spfeature -Limit ALL | Where-Object {$_.Scope -eq “SITE”}

This will get a list of all installed “SITE” scoped Feature. Replace Site with Web or Farm to see the list

clip_image004

Comments so far »

  1. STSADM –o enumfeatures « SharePointRoot said,

    Wrote on January 31, 2011 @ 10:38 am

    [...] found a great post from Alpesh Nakars – detailing the get-spfeature statement – in [...]

  2. Sharepoint 2010 Feature Definitions said,

    Wrote on March 24, 2011 @ 12:56 am

    [...] Get-SPFeature  -web (Retrieves all the enabled Features in the Web) [...]

Comment RSS · TrackBack URI

Leave a Comment

Name: (Required)

E-mail: (Required)

Website:

Comment:

Comment moderation is enabled. Your comment may take some time to appear.