Sunday, March 25, 2012

Enable/Disable feature - SharePoint 2010 PowerShell

Some times you need just enable /disable feature .
So for me the good way is doing by PowerShell :

1. Get all installed features to the text file:

Get-SPFeature | Sort -Property Scope,DisplayName | FT -GroupBy Scope DisplayName,Id > c:\AllInstalledFeatures.txt

2. Go to the c:\AllInstalledFeatures.txt and find the relevant feature. Copy the guid.

3. Enable Feature:

Enable-SPFeature -identity "cdd0d039-d2d2-40c8-81fc-0d5657fc2962" -URL http://contoso.com

4. Disable Feature:

Disable-SPFeature -identity "cdd0d039-d2d2-40c8-81fc-0d5657fc2962" -URL http://contoso.com

No comments:

Post a Comment