How To Enable The SharePoint Learning Kit Feature On All Sites In A Site Collection

21 November, 2012 · less than a minute to read

How To Enable The SharePoint Learning Kit Feature On All Sites In A Site Collection

Sometimes you want to be able to assign work from anywhere within your site collection. For the E-Learning Actions custom action to be added to a document library you need to enable the SharePoint Learning Kit feature on that site, so to enable it everywhere you need to enable the feature on all sites. To do this in SharePoint 2010 all you need is a simple PowerShell script which iterates through all the sites and then enables the feature if it is not already enabled. The following script will do that for you. You will need to change the url value to reference your site collection, save in a .ps1 file and then run from the SharePoint 2010 Management Shell.

$url = "http://urlOfSiteCollection" $site = Get-SPSite $url $featureId = "00057002-c978-11da-ba52-00042350e42e" $featureName = "SharePointLearningKit" $site.Urlforeach ($web in $site.AllWebs) {    # Output the site url for debugging purposes    $web.Url    # Only enable if not already enabled    if (!$web.Features[$featureId])    {        # Output debugging message        "Enabling..."        Enable-SPFeature $featureName -Url $web.Url    } }

You can also use this for other features, just by replacing the feature id and name with the appropriate values. To find these look in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES The feature name is the name of the folder in here and the id is in the feature.xml file in that folder.

Richard Willis headshot

Written by Richard Willis

Founder / Chairman

Richard started SalamanderSoft in 2007 after a successful career as a software developer. Wanting to start his own company and with experience in integrating school systems he set out to build the best integration system for schools and to exceed customer expectations. He starting out on his own, doing all the coding, support and sales until finally the growing number of customers meant he needed to start growing the team. He is still heavily involved in coding the core Integration Suite product.

Copyright © 2022 SalamanderSoft Limited