Recently I had to deactivate/activate a hidden feature that was deployed to a SharePoint 2010 Site Collection. It was deployed as hidden to prevent a critical capability from being turned off accidentally. Hidden features do not show up on the Manage Site Features page, but they can be displayed using PowerShell.

I needed to perform the following:

  • List the active features
  • Deactivate/Activate the feature

List The Active Features

Getting the Feature list is pretty simple. Run the following PowerShell Command from the SharePoint 2010 Management Shell (Replace http://SharePointSite/ with the site you would like to use):

Get-SPFeature -Site http://SharePointSite/

A list similar to the following will be returned displaying both the feature name and corresponding ID:

If you are not sure what Web the feature is activated in, run the following:

Get-SPSite http://SharePointSite/ | Get-SPWeb -Limit ALL | %{ Get-SPFeature -Web <a>$_</a> } | Sort DisplayName -Unique | FT DisplayName,Id

This will return a distinct list of ALL features that are active in the Site Collection.

Deactivating the Feature

A feature can be disabled by name or ID. In my case, I chose to deactivate and activate the feature by ID rather than name. The name of the feature was too long and did not fully display in the results from above.

Disable-SPFeature -Identity FeatureNameHere -url http://SharePointSite/


Disable-SPFeature -Identity FeatureIDHere -url http://SharePointSite/

Activating the Feature

To Activate the feature, do the same as above, but use Enable-SPFeature instead of Disable-SPFeature.

Enable-SPFeature -Identity FeatureNameHere -url http://SharePointSite


Enable-SPFeature -Identity FeatureIDHere -url http://SharePointSite/