0

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.

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, privacy policy and cookie policy

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