Activating and Deactivating Features with PowerShell in SharePoint 2010


Enable-SPFeature –Identity Reporting –url http://sp2010

If your command worked successfully, you will see nothing and just get a blank prompt back.

PowerShellEnableSPFeatureNoOutput

If you would like to get some feedback from the command, you can have it return the SPFeature object back to you by specifying the –PassThru parameter.
PowerShellEnableSPFeaturePassThru

We can confirm that the feature did in fact activate successfully using the SharePoint UI.

PowerShellReportingFeatureEnabledUI


Get-SPFeature


However, if you want to know which features are enabled, you can pass it a URL for a given scope (i.e.: –Web, –Site, –WebApplication, and –Farm).  So to get a list of all Site Collection scoped features, we would use the –Site parameter.

Get-SPFeature –Site http://sp2010
PowerShellGetSPFeatureSite
You can still specify a specific feature or even use Where-Object to query the list as well.

Get-SPFeature –Identity Reporting –Site http://sp2010


PowerShellGetSPFeatureSiteSpecific

Refer :Click Here


Comments

Popular posts from this blog

IRM and the Object Model

This content database has a schema version which is not supported in this farm

Activate and Deactivate Feature through PowerShell