SQL Server 2005 onwards- Capturing Baseline
Check out Rodney Landrum's SQL Server Tacklebox. It's a free book from Red Gate that includes scripts to do that:

http://www.red-gate.com/community/books/sql-server-tacklebox