Sunday, April 10, 2011

Managing Features in SharePoint using PowerShell-STSADM

To activate SharePoint feature using stsadm

stsadm –o activatefeature –name <feature-name> –url <URL>

Where the URL could be

  • web application URL
  • site collection URL
  • Sub site URL
Depending on the feature scope.

To activate a Feature in SharePoint 2010 using PowerShell
Enable-SPFeature <FeatureFolderName in 14 hive> -Url http://server/site/subsite
$feature = Get-SPFeature -Identity e819dc7-70fd-41723-2323a

Enable-SPFeature $feature –Url "http://SharePointSite" -Force

To Deactivate a SharePoint Feature using Stsadm:
stsadm –o deactivatefeature –name MyFeatureName –url http://myspwebapp

$feature = Get-SPFeature -Identity e819dc7-70fd-41723-2323a
Disable-SPFeature $feature –Url "http://SharePointSite" -Force

How to install SharePoint feature using stsadm
stsadm -o installfeature -filename {FeatureFolder}\feature.xml
Install-SPFeature –Path "MyFeature" -Force

Uninstall SharePoint feature using stsadm
stsadm -o uninstallfeature -filename {FeatureFolder}\feature.xml
UnInstall-SPFeature -Path "<feature Folder in 14 hive>"
$feature = Get-SPFeature -Identity  e819dc7-70fd-41723-2323a
Uninstall-SPFeature $feature -Force

Get Feature list (Display List of all installed Features):
Get-SPFeature –Farm

Display the features at the web application level:
Get-SPFeature –WebApplication "SharePoint – 8080"

To Display All Installed Site Collection Features
Get-SPFeature –Site "http://SharePointSite"

To Displaying All Installed Site Features (Feature list using PowerShell)
Get-SPFeature –Web "http://SharePointSite"

To Get a Specific Feature
$feature = Get-SPFeature -Identity e819dc7-70fd-41723-2323a

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.

Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...