I was attempting to debug an issue I was having with a feature stapler I created today (the issue is fixed and the error isn’t important here), but it got me wondering. I want to be able to see a list of features that are stapled to a particular site template or definition, and what the scope is of the stapler, but I haven’t found any way of doing that yet (most blogs and articles are on how to create a stapler).
So, in short, does anyone know of a way to retrieve a list of stapled features (via SP Object Model, PowerShell, Web UI, SharePoint Manager, SQL Script, or crystal ball)?
I’ve discovered that the best way to do this is to run a “findstr” console command on the features directory looking for stapler definitions in the elements.xml files. Once you have the list of features, you can just cross-reference them with the features that are activated on the site.
Hopefully this helps someone else…