Get a Specific Feature

Scenario/Problem: You need to obtain a specific feature reference.

Solution: Use the Get-SPFeature cmdlet to assign a variable to the results using the -Identity parameter.

Providing the identity of the solution with the Get-SPSolution cmdlet retrieves a specific solution. Use this to assign the results to an object for use in other cmdlets, as shown in Listing 9.21.

Listing 9.21. Assigning a Variable to a Specific Feature

$feature = Get-SPFeature-Identity e8389ec7-70fd-4179-a1c4-6fcb4342d7a0

Tip

Although you may also retrieve the feature using its display name, it is recommended to use the feature GUID such that the exact feature and scope can be determined. The feature GUID uniquely identifies the feature, whereas ...

Get PowerShell™ for SharePoint® 2013 How-To now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.