Books Online. It may sound obvious, but in reality most admin
interfaces to MSSQL are using TSQL - Enterprise Manager executes TSQL
behind the scenes, and so does SQLDMO.
If you're familiar with COM, you can use SQLDMO for most admin tasks,
and if not then executing TSQL commands or scripts with osql.exe will
work too. If you know how to do something in Enterprise Manager, but
not from TSQL, then you can use Profiler to trace what EM is sending to
the server and re-use that in your own scripts.
Simon