Saturday, March 2, 2013

Powershell script to report all SharePoint Farm Feature Definitions in a Grid View

The PowerShell script below generates a Grid View report on all SharePoint Features installed within a Farm.

Copy the script below and paste it into a .ps1 file.
==================================================================

Add-PsSnapin Microsoft.SharePoint.PowerShell

## SharePoint DLL
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration")

## Creating SharePoint Farm
$farm = [Microsoft.SharePoint.Administration.SPFarm]::Local
$farm.FeatureDefinitions | Select ID, DisplayName, RootDirectory | Out-GridView

Remove-PsSnapin Microsoft.SharePoint.PowerShell
==================================================================

Alternatively, you can also generate a CSV report, based on the above script.

No comments:

Post a Comment