Introduction to SQL-DMO
This article by Andy warren shows you how to get started with DMO using either VB or VBScript. The article includes sample code that will backup all databases on a server and will update the statistics on all databases as well.