In order to get the job done, sometimes you have to spend some time searching for the right tool. This was the case for me over the last few days as I was working to prepare a MOSS 2007 site collection for migration to SharePoint 2010. The site collection had several of custom features that we’re not migrating to SP 2010. Unfortunately, these custom features could not be easily removed, and there were references to them throughout the site. The SP 2010 STSADM preupgrade check (which ships with MOSS 2007 SP2) was reporting a number of features as “Missing”:
I originally tried using Stefan Gossner’s extremely useful tool, WSSRemoveFeatureFromSite (http://code.msdn.microsoft.com/WssRemoveFeatureFrom), and was able to remove about half of the problematic features. However, there were still about nine features flagged by the preupgrade tool, and Stefan’s tool was failing with this error:
Error: Url is not a valid URL for a site!
(The URL was valid and the site was fully accessible.)
After a little more searching, and I found the following cool utility:
SharePoint Feature Administration and Clean Up Tool
http://featureadmin.codeplex.com
This cool program is nothing less than a Swiss Army knife for managing features in SharePoint. It shows you which features are installed in your farm (farm, site collection, and web level), you can also activate/deactivate features, uninstall features, and (my favorite function!) – scan for problem features in the farm and remove them on the spot!
I ran it against my farm and it located and removed all problem features from the site collection (I double-checked each feature that was being removed, and they all were features flagged by the STSADM preupgradecheck).
As a result, the SharePoint 2010 preupgrade check now reports ZERO problematic features.
Awesome!!!