XP_CMDSHELL allows you to run OS commands via T-SQL
What you wanted to do was either
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Agent XPs', 1;
GO
RECONFIGURE
GO
OR since you are familiar with the Surface Area Configuration tool within SQL | Click on SQL Server Agent | change Startup to Automatic | click Start
Chris Powell
George: You're kidding.
Elroy: Nope.
George: Then lie to me and say you're kidding.