Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
By Patrick Akhamie,
Please modify the dbmail piece (above the last two lines of code) to allign with your environment. Alternatively, you can remove it or comment it out if you don't need the script to send emails. The result will look like what is below.