The vast majority is done through the provided interfaces and T-SQL. But if you're really interesting in automating administration of the servers and instances, PowerShell is your bestest friend in the world.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning