Not many people use the templates available in SQL Server Management Studio (SSMS) and I was one of those people until recently when I had to complete an end to end SQL Server automated installation. This included all SQL Server configurations. Now some of these are easy to script but others are a bit more difficult.
This is where we used SSMS templates.
I suppose one reason that not many people use templates is that by default when you open up SSMS the Template Explorer isn’t visible. It might be hidden behind another tab or it may actually be closed. Press Ctrl + Alt + T or use the View menu to bring it into view.
It was very useful in creating consistent scripts with all required parameters. The scripts for database mail and audit specifications were created quicker with all options.
Next time you have to create a script for a T-SQL task, have a look in the templates to see if one is available. The less code you have to write the better.