Get features (with hidden) using PowerShell in SharePoint 2013/2016

This PowerShell SharePoint tutorial explains, how to get features using PowerShell in SharePoint 2013/2016. Also, we will see how to show hidden features using PowerShell in SharePoint 2013/2016.

In SharePoint, we can enable and disable some feature with the help of features. In SharePoint, we can find 3 types of features.

  • Out Of the Box (OOB) features
  • Custom features
  • Hidden features

Get SharePoint Features using PowerShell

Now, we will see how to retrieve features in SharePoint using PowerShell. We will be able to retrieve farm and site-level features in SharePoint 2013/2016.

The below PowerShell command will display features from the farm, it will show features from farm level, web application level, site collection level, site level also.

Now we will discuss, how to get a list of all the hidden features in SharePoint 2013. In SharePoint, we create a feature as hidden to avoid accidental clicks which could disable the important feature. In SharePoint, Microsoft has created many hidden features by default like the way how we have hidden lists.

Add-PSSnapin "Microsoft.SharePoint.PowerShell"
Get-SPFeature | Sort -Property DisplayName

It should show like below:

Get SharePoint 2013 Features using PowerShell

The below command will sort based on the scope as well as it will filter based on scope like first Farm, web application, site collection, etc.

Get-SPFeature | Sort -Property Scope,DisplayName | FT -GroupBy Scope DisplayName,Id

Below PowerShell command which will display features within a particular SharePoint site collection:

Add-PSSnapin "Microsoft.SharePoint.PowerShell"
Get-SPFeature -Site https://SiteCollectionURL/ | Sort DisplayName | FT DisplayName,Id

Below command will display SharePoint features which are in web scope.

Add-PSSnapin "Microsoft.SharePoint.PowerShell"
Get-SPSite https://SiteCollectionURL/ | Get-SPWeb -Limit ALL | %{ Get-SPFeature -Web $_ } | Sort DisplayName -Unique

Below command will display features which are in web scope and it will filter based on DisplayName and ID.

Add-PSSnapin "Microsoft.SharePoint.PowerShell"
Get-SPSite https://SiteCollectionURL/ | Get-SPWeb -Limit ALL | %{ Get-SPFeature -Web $_ } | Sort DisplayName -Unique | FT DisplayName,Id

This is how we can retrieve features using PowerShell in SharePoint 2013/2016.

Display SharePoint hidden features using PowerShell

In SharePoint, if we want to list the hidden features we have to either write object model and read through all the features to determine the feature is hidden or not else we have to execute PowerShell commands.

Hidden features can be created/existed with various scopes:

  • FARM
  • Web Application
  • Site Collection
  • Web

Now, we will see how to list the hidden features in SharePoint using PowerShell.

Open Microsoft SharePoint PowerShell command line window as an administrator. You can also read SharePoint 2013 PowerShell articles on Windows PowerShell ISE Tutorial and Debugging PowerShell with Visual Studio Code

Run the below command to list all the hidden features in SharePoint 2013 with the scope as “Web

Get-SPFeature -Limit ALL | Where-Object {$_.Hidden -eq $true -and $_.Scope -eq "Web"} | sort-object DisplayName | Get-Unique -asstring | Sort-Object DisplayName | Select DisplayName, Id, Scope
get SharePoint hidden features using PowerShell

The below command will list all the hidden features with the scope as “Web Application

Get-SPFeature -Limit ALL | Where-Object {$_.Hidden -eq $true -and $_.Scope -eq "WebApplication"} | sort-object DisplayName | Get-Unique -asstring | Sort-Object DisplayName | Select DisplayName, Id, Scope

The below command will list all the hidden features with the scope as “Site Collection

Get-SPFeature -Limit ALL | Where-Object {$_.Hidden -eq $true -and $_.Scope -eq "Site"} | sort-object DisplayName | Get-Unique -asstring | Sort-Object DisplayName | Select DisplayName, Id, Scope

The below command will list all the hidden features with the scope as “FARM“.

Get-SPFeature -Limit ALL | Where-Object {$_.Hidden -eq $true -and $_.Scope -eq "FARM"} | sort-object DisplayName | Get-Unique -asstring | Sort-Object DisplayName | Select DisplayName, Id, Scope

Once you see the list you can enable any required feature with the below PowerShell command with the GUID of the feature.

Syn:
Enable-SPFeature –Identity "<<GUID>>" –url <<Site collection URL>> -PassThru

Ex:
Enable-SPFeature –Identity "af847aa9-beb6-41d4-8306-78e41af9ce25" –url http://sharepoint13:12345

You may like following SharePoint tutorials:

Hope this sharepoint 2013 PowerShell tutorial will help you to retrieve hidden features in SharePoint 2013 using PowerShell.

free sharepoint training

SharePoint Online FREE Training

JOIN a FREE SharePoint Video Course (3 Part Video Series)

envelope
envelope

Krishna Vandanapu

I am Krishna.Vandanapu a SharePoint architect working in IT from last 13+ years, I worked in SharePoint 2007, 2010, 2013, 2016 and Office 365. I have extensive hands on experience in customizing SharePoint sites from end to end. Expertise in SharePoint migration tools like Sharegate, Doc Ave and Metalogix. Migrated SharePoint sites from SharePoint 2007 to 2010 and 2010 to 2013 several times seamlessly. Implementing CSOM with Microsoft best practices. Spent quality time in configuring SharePoint application services like User Profile, Search, Managed Meta data services etc. Now exploring SharePoint Framework and SharePoint 2019

>