I would like a script that could activate multiple features (list of features) at once in a single site collection. I was wondering if anyone out there has done this already. Any help would be appreciated.
Give following script a try. I am assuming (as you mentioned), you are maintaining a SharePoint list with all the feature GUIDS and these are all site collection features.
I have not verified the code but should work.
===================================================
$listTitle = “YOUR FETATURE GUID LIST TITLE”
$siteURL = Read-Host ‘Please enter site collection URL’
$site = Get-SPSite $siteURL
$web = $site.OpenWeb()
$list = $web.Lists[$listTitle]
foreach ($lstItem in $list.Items)
{
$featureGUID = $lstItem[“FEATURE GUID COLUMN NAME”]
$feature = $site.Features[$featureGUID]
if($feature -eq $null)
{
Enable-SPFeature -Identity $featureGUID –url $site.URL
}
}