Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I want to remove all custom sharepoint 2010 features from my farm:

The scritp below gets them, but doesn't remove them. How should this be modified to remove them?

$url = "Your site URL here"

$site= new-Object Microsoft.SharePoint.SPSite($url)

$site.WebApplication.Farm.FeatureDefinitions 
| where-object {$_.solutionid -ne '00000000-0000-0000-0000-000000000000'} 
| Sort-Object solutionid,displayname 
| ft -property solutionid,displayname,scope -auto > features.txt

$site.Dispose()

Adding | $_.Remove() in place of > features.txt causes a compilation error.

share|improve this question
add comment

1 Answer

Hopefully all your features has been installed through Solution packages to it would be better to retract these and the remove them.

But it may cause a lot of things not to work anymore.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.