Tuesday, July 12, 2011

Locate SharePoint FEATURE from Title

Many times, I wanted to know elements of a particular FEATURE (any scope) before I hit the Activate button so that I can inspect the elements manifests and understand what the FEATURE would do to the site (or site collection, farm or web application).

SNAGHTML116d43

And I figured out that is no straightforward way to locate the FEATURE on the SharePoint Root. I wish Microsoft had provided a link “Open FEATURE folder” on click of which, it opens the FEATURE’s root directory for me…. At least for the Site Collection Administrators?

Anyways, I needed it desperately, so I had to help myself. I also posted a question on SharePoint Overflow and see if someone has already done that before. I wanted to do it with minimum efforts and finally, came up with following simple PowerShell Script;

Explorer (Get-SPFeature | Where-Object {$_.GetTitle([System.Globalization.CultureInfo]::CurrentCulture) -eq "Content Organizer"}).RootDirectory
What it does is retrieves the FEATURE’s list and then applies filter to select FEATURE which matches my Title. Getting Title was tricky but not as much as you can see above. And finally, I wanted to save few more clicks and keyboard strokes, so I used “Explorer” command and opened the directory in  Windows Explorer!
Hope this helps….

1 comment:

  1. Very useful post on sharepoint.

    Thanks
    rk roy
    http://www.logimindz.com/sharepoint-consulting.php

    ReplyDelete