Get sharepoint sites based on the same template

Jul 1, 2009 at 9:26 AM

Hi all,

How can I get all sites based on a specific template (.stp) under a collection. Considering a given site, I would like to have a reference on its template (or a guid or anything that would refer to the template), then get all sites that have the same template.
Thanks for your help.