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.