Add a SharePoint Feature Member to a Feature Pack

Let’s take a look on how to add a newly installed feature to an established feature pack.

An example of this would be a multi-tenant farm that leverages feature packs, where we just installed a new web part.

When the web part is installed the features is part of the farm, but not part of any our site collections. This happens because the new feature is not associated with any feature packs that are used in the multi-tenant scenario.

The first let’s take a look to see what exact features I have assigned to our site subscription

Get-SPSiteSubscriptionFeaturePack -SiteSubscription http://sharepoint2010 | ForEach{ $_.FeatureDefinitions }

Great we can see all the features assigned to this particular feature pack set. That feature pack is then tied to our site collection via site subscription.

Now we need our feature Pack ID so we can assign it a new feature pack member

$featurepack = Get-SPSiteSubscriptionFeaturePack -SiteSubscription http://sharepoint2010

Next, we need our newly installed feature’s ID that needs added to the feature pack

Or we can find the ID for the new feature member in the feature.xml file located here: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES

Now let’s assign that ID to a variable. In this example I’m adding the ‘AssetLibrary’ feature.

$member = Get-SPFeature | ? { $_.displayname -eq “AssetLibrary” }

Now add the feature member to the feature pack

Add-SPSiteSubscriptionFeaturePackMember -Identity $ -FeatureDefinition $

So now the feature has been added feature pack. Any subscriptions tied to that feature pack now have the feature installed, but not active.

Let’s activate it in our site collection…

Enable-SPFeature –identity $ -url “http://sharepoint2010”


About the Author

2 thoughts on “Add a SharePoint Feature Member to a Feature Pack

Leave a Reply

%d bloggers like this: