how to get site template id

View all webs and site templates under site collection

We can get all webs and site templates under site collection by using the a small script. Read full article to know in details.