SharePoint Feature Activation Report

SharePoint Active Feature Report

There are times that it is useful to know which site collections have a given feature active. First, let’s find the feature by name and GUID using this CmdLet:

Get-SPFeature

Now let’s do a report of which site collections have the feature enabled/disabled:

$TargetFeatureName = "OpenInClient"
$webapp= Get-SPWebApplication -identity "ht tp://sharepoint" 
foreach($site in $webApp.Sites)
{
$feature=Get-SPFeature -Site $site | Where-object {$_.DisplayName -eq $TargetFeatureName}
if($feature -ne $null)
{
Write-host "$($TargetFeatureName) Feature Activated at" $site.Rootweb.URL
}
else
{
Write-host -ForegroundColor DarkRed "$($TargetFeatureName) Feature Not Activated at" $site.Rootweb.URL
}
}
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *