0

How do I find which custom feature (50+) is installed and activated in which subsite (1000+ sub sites) in a SharePoint 2010 site.

1

Use PowerShell Script To Find Where SharePoint 2010 Features Are Activated

function Get-SPFeatureActivated 
{ 
# see full script for help info, removed for formatting 
[CmdletBinding()] 
param( 
  [Parameter(position = 1, valueFromPipeline=$true)] 
  [Microsoft.SharePoint.PowerShell.SPFeatureDefinitionPipeBind] 
  $Identity 
)#end param 
  Begin 
  { 
    # declare empty array to hold results. Will add custom member ` 
    # for Url to show where activated at on objects returned from Get-SPFeature. 
    $results = @() 

    $params = @{} 
  } 
  Process 
  { 
    if([string]::IsNullOrEmpty($Identity) -eq $false) 
    { 
      $params = @{Identity = $Identity 
            ErrorAction = "SilentlyContinue" 
      } 
    } 

    # check farm features 
    $results += (Get-SPFeature -Farm -Limit All @params | 
             % {Add-Member -InputObject $_ -MemberType noteproperty ` 
                -Name Url -Value ([string]::Empty) -PassThru} | 
             Select-Object -Property Scope, DisplayName, Id, Url) 

    # check web application features 
    foreach($webApp in (Get-SPWebApplication)) 
    { 
      $results += (Get-SPFeature -WebApplication $webApp -Limit All @params | 
               % {Add-Member -InputObject $_ -MemberType noteproperty ` 
                  -Name Url -Value $webApp.Url -PassThru} | 
               Select-Object -Property Scope, DisplayName, Id, Url) 

      # check site collection features in current web app 
      foreach($site in ($webApp.Sites)) 
      { 
        $results += (Get-SPFeature -Site $site -Limit All @params | 
                 % {Add-Member -InputObject $_ -MemberType noteproperty ` 
                    -Name Url -Value $site.Url -PassThru} | 
                 Select-Object -Property Scope, DisplayName, Id, Url) 

        $site.Dispose() 

        # check site features in current site collection 
        foreach($web in ($site.AllWebs)) 
        { 
          $results += (Get-SPFeature -Web $web -Limit All @params | 
                   % {Add-Member -InputObject $_ -MemberType noteproperty ` 
                      -Name Url -Value $web.Url -PassThru} | 
                   Select-Object -Property Scope, DisplayName, Id, Url) 

          $web.Dispose() 
        } 
      } 
    } 
  } 
  End 
  { 
    $results 
  } 
} #end Get-SPFeatureActivated

Then filter for only custom features

  • Please provide the details from the link. If the link goes down the answer will not be useful – Nadeem Yousuf Feb 26 '15 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.