By default xp_cmdshell option disable, you can enable this from server configuration. Commands are as follows:
-- To allow advanced options to be changed.
EXEC sp_configure 'show advanced options', 1
GO
--To update the currently configured value for advanced options.
RECONFIGURE
GO
-- To enable the feature.
EXEC sp_configure 'xp_cmdshell', 1
GO
-- To update the currently configured value for this feature.
RECONFIGURE
GO
Enable xp_cmdshell in Sql Server 2008
This blog will explain you, how to enable xp_cmdshell in Sql Server 2008.

Join the conversation! Your thoughts help the community grow.