I want to get Feature ID by using its name in sharepoint 2010. I have activated the feature on my root site collection using web interface. What is the management shell command for doing this in sharepoint 2010?
3 Answers
Here is an example of how you can filter the Get-SPFeature Powershell Cmdlet in order to get only those feature you know a part of the feature name.
This snippet will list all features, where "Content" is contained in the Display Name of a Feature :
Get-SPFeature | where { $_.DisplayName -like "*Content*" }
If you want to List a sandboxed feature by name try this:
Get-SPUserSolution -Site "<siteurl>" | ?{ $_.Name -like "*Content*" }
http://www.enterprisebugs.com/2011/11/find-sharepoint-feature-by-name.html
Here are the examples to get the Details of a Feature.
If you are not sure of the name, use this snippet. It will get all with name contained in Display Name
Get-SPFeature -Limit ALL | Where-Object {$_.DisplayName -like "*YourFeatureName*"}
Get all feature installed in site scoped
Get-SPFeature -Limit ALL | Where-Object {$_.Scope -eq "SITE"}
Get ID and name of each uniquely enabled feature on every SPWEB in site collection
Get-SPSite http://somesite | Get-SPWeb -Limit ALL | Where-Object { Get-SPFeature -Web $_ } | Select DisplayName,ID -Unique
Refered From: https://technet.microsoft.com/en-us/library/ff607945.aspx