Monday, July 9, 2012

Upgrading SharePoint Feature using PowerShell


$site = get-spsite "http://mysite"
$features = $site.QueryFeatures("web", $true);

foreach($feature in $features)
{
        if($feature.Definition.DisplayName -eq "FeatureName")
        {       
            $feature.Upgrade($true);
        }
}

No comments: