Thursday, August 04, 2011

Listing features on SharePoint 2010 with Powershell

The Get-SPFeature PowerShell cmdlet allows you to list all the features for a specific scope – to list all features installed on the farm sorted by DisplayName you use the following

   1:  Get-SPFeature | Sort - Property DisplayName




This will give you an enormous amount of information about the different features such as DisplayName, ReceiverAssembly, UIVersion, Scope, … basically all the properties which can be defined for a Feature Element.



You can also specify which fields you want displayed using the following syntax




   1:  Get-SPFeature | Select  DisplayName, Scope, ID



It is also quite easy to export the results to CSV format




   1:  Get-SPFeature | select DisplayName, Scope, ID | export-csv c:\features.csv




If you only need to list activated features for a specific site collection you can use the following




   1:  Get-SPFeature -Site http://url | Sort DisplayName




And similar for an individual SharePoint site




   1:  Get-SPFeature -Web http://url



 


 




No comments: