MSH & SMO
I've started playing around with MSH https://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx to see what it can do and how it may be of use to DBA's. This article https://pluralsight.com/blogs/dan/archive/2005/12/29/17703.aspx goes even further to explain how to integrate MSH with SMO (new SQL Server object model) I haven't read all of it yet but it certainly seems quite powerful.