Get a quick report on SharePoint 2010 Features running in your site collection

Whether you’re doing a routine maintenance or something blew up – it’s quite handy to be able to query your site collection and get a report on features that are running on each of the sub sites.

Just recently I was involved in a troubleshooting of SharePoint Content Deployment job which failed reporting a feature not activated on one of the farms – the farm had over 100 sites – so finding the feature using UI would have been very painful.

Fortunately SPSite has a method allowing you to query features on site collection and subwebs called QueryFeatures, among other overloaded methods, QueryFeatures(Guid) is quite handy when looking for a specific GUID.

Here is how something like think can be used in PowerShell to find sites that have calendar feature enabled:

PS C:\Users\yar> $site = spsite "http://yar2010"
PS C:\Users\yar> $site.QueryFeatures("00BFEA71-EC85-4903-972D-EBE475780106")
As a result I get:

DefinitionId           : 00bfea71-ec85-4903-972d-ebe475780106
Parent                 : Demo
Properties             : {}
Definition             : SPFeatureDefinition Name=FeatureDefinition/00bfea71-ec
85-4903-972d-ebe475780106
Version                : 3.0.0.0
FeatureDefinitionScope : Farm
DefinitionId           : 00bfea71-ec85-4903-972d-ebe475780106
Parent                 : Search
Properties             : {}
Definition             : SPFeatureDefinition Name=FeatureDefinition/00bfea71-ec
85-4903-972d-ebe475780106
Version                : 3.0.0.0
FeatureDefinitionScope : Farm
Enjoy!
This entry was posted in cloud, sharepoint 2010. Bookmark the permalink.

Comments are closed.