Tuesday 16 October 2012

Find Deployed Feature

If you're getting an error that refers to the oh so helpful GUID, here's a handy little script that lists Features and filters them
By Guid:
$results=Get-ChildItem "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\" feature.xml -rec

foreach ($File in $results)
{
   [xml]$feat=gc $file.pspath
   if($feat.feature.id -Like '3752ccf3*')
   {
        $feat.feature | Select ID, Title, Scope, Name
   }
}

By Title:
$results=Get-ChildItem "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\" feature.xml -rec

foreach ($File in $results)
{
   [xml]$feat=gc $file.pspath
   if($feat.feature.title-Like 'TEC*')
   {
        $feat.feature | Select ID, Title, Scope, Name
   }
}