Scenario/Problem: You need to obtain a feature reference and therefore need a listing of available features.
Solution: Use the Get-SPFeature
cmdlet using the desired scope.
The Get-SPFeature
cmdlet is handy for listing the installed features at various levels within your SharePoint environment. Issuing the command without any parameters displays all features at every level. Because there are about 12 dozen features at all levels, listing them all is usually not helpful.
Luckily, the Get-SPFeature
cmdlet has several parameter sets you can use to narrow your list of features. To display the features at the farm level, simply use the -Farm
switch parameter, as shown in Listing 9.17.
Get-SPFeature -Farm
To display the features at the web application level, use the -WebApplication
parameter and provide the web application name or identity, as shown in Listing 9.18.
Get-SPFeature -WebApplication "SharePoint - 80"
This also works for site collection and site features. For site collections, use the -Site
parameter (see Listing 9.19); for site features, use the -Web
parameter (see Listing 9.20).
Get-SPFeature -Site "http://sp2013"
Get-SPFeature -Web "http://sp2013"
3.147.104.120