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)

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


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

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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