Get a list of the database names and database size in a sql server instance using tsql:
EXEC sp_databases