locked
Find Name of Feature using ID RRS feed

  • Question

  • Hi,

    I have the ID of a feature.  I need to find out the name of the feature.  I have no idea whether it is Farm, WebApp, Site, Web, etc feature.

    Is there an easy way to find out the name e.g. a Powershell Command?

    Mark

     

    Thursday, February 27, 2014 5:45 PM

Answers

  • Hi,

    The way Mark suggested you may figure out only standard feature names.  Alternatively, since feature files are stored in hive 14, you may lookup feature name by its ID using simple Powershell command by searching through feature files. (Of course replace my sample Guid with your own one):

    dir "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES" -r -i feature.xml | select-string "a568770a-50ba-4052-ab48-37d8029b3f47" | get-content

    Then notice the feature Title attribute in the output file:
    <Feature Id="a568770a-50ba-4052-ab48-37d8029b3f47"
        Title="Circulation List"
    ...

    Things become a bit more complicated if instead of the actual title you get the resource id, like this:

    Title="$Resources:core,announcementslistFeatureTitle;"

    In this case you should lookup the actual title in the core resource file, in case of en-US locale it is core.en-US.resx.  In Powershell, read the resource file in variable:

    [xml]$xml = Get-Content "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources\core.en-US.resx"

    And locate the entry for the resource id you have just found, like this:

    $xml.selectNodes("//root/data[@name='announcementslistFeatureTitle']") | select value

    The output will be:

    value
    -----
    Announcements Lists

    -- Ilya


    • Edited by Ilya Oussov Thursday, February 27, 2014 6:38 PM
    • Marked as answer by JasonGuo Sunday, March 9, 2014 8:02 AM
    Thursday, February 27, 2014 6:38 PM

All replies

  • Thursday, February 27, 2014 5:53 PM
  • Hi,

    The way Mark suggested you may figure out only standard feature names.  Alternatively, since feature files are stored in hive 14, you may lookup feature name by its ID using simple Powershell command by searching through feature files. (Of course replace my sample Guid with your own one):

    dir "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES" -r -i feature.xml | select-string "a568770a-50ba-4052-ab48-37d8029b3f47" | get-content

    Then notice the feature Title attribute in the output file:
    <Feature Id="a568770a-50ba-4052-ab48-37d8029b3f47"
        Title="Circulation List"
    ...

    Things become a bit more complicated if instead of the actual title you get the resource id, like this:

    Title="$Resources:core,announcementslistFeatureTitle;"

    In this case you should lookup the actual title in the core resource file, in case of en-US locale it is core.en-US.resx.  In Powershell, read the resource file in variable:

    [xml]$xml = Get-Content "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources\core.en-US.resx"

    And locate the entry for the resource id you have just found, like this:

    $xml.selectNodes("//root/data[@name='announcementslistFeatureTitle']") | select value

    The output will be:

    value
    -----
    Announcements Lists

    -- Ilya


    • Edited by Ilya Oussov Thursday, February 27, 2014 6:38 PM
    • Marked as answer by JasonGuo Sunday, March 9, 2014 8:02 AM
    Thursday, February 27, 2014 6:38 PM