1

How can I see the features attached to a list? (ex: which feature create an item custom action)

0

You can use PowerShell to find this information

function Get-SPCustomAction 
{   
    trap [Exception] { continue; } 
    cls 
    $null = [system.reflection.assembly]::loadwithpartialname("Microsoft.Sharepoint") 
    $null = [system.reflection.assembly]::loadwithpartialname("Microsoft.Sharepoint.Administration") 
    $null = [system.reflection.assembly]::loadwithpartialname("System.Web") 
    [string]$xmlString = "<?xml version=""1.0"" encoding=""utf-8"" ?><CustomActions>" 
    $farm = [microsoft.sharepoint.administration.spfarm]::local 
    foreach ($featureDef in $farm.FeatureDefinitions) 
    { 
        trap [Exception] { continue; } 
        foreach ($elementDef in $featureDef.GetElementDefinitions([System.Globalization.CultureInfo]::CurrentCulture)) 
        { 
            trap [Exception] { continue; } 
            $node = $elementDef.XmlDefinition; 
            if ($node.Name -eq "CustomAction") 
            { 
                trap [Exception] { write-error $($_.Exception.Message); continue; } 
                $xmlString += "<CustomAction Id=""" + $node.Id + """ GroupId=""" + $node.GroupId + """ Location=""" + $node.Location + """ Sequence=""" + $node.Sequence + """ Title=""" + $node.Title + """ " 
                if($node.UrlAction -ne $null -and $node.UrlAction.OuterXml -ne "" -and $node.UrlAction.Url -ne $null -and $node.UrlAction.Url -ne "") 
                { 
                    $xmlString +=  "Url=""" + [System.Web.HttpUtility]::UrlEncode($node.UrlAction.Url.ToString()) + """ "
                } 
                $xmlString += " 
xmlns=""http://schemas.microsoft.com/sharepoint/""/>" 
            } 
        } 
    }  

    $xmlString += "</CustomActions>" 

    #$xmlString = $xmlString.Replace("&", " ") 
    Write-Output  $xmlString 
} 

This will list down all custom action in a Farm. You can also print the $featureDef.Name to find the feature Name

http://blogs.msdn.com/b/ekraus/archive/2010/05/03/list-all-customactions-in-the-farm.aspx

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.