exec master.dbo.sp_configure 'show advanced option', 1;
RECONFIGURE WITH OVERRIDE
exec master.dbo.sp_configure 'Ad Hoc Distributed Queries',1
exec master.dbo.sp_configure 'xp_cmdshell',1
exec master.dbo.sp_configure 'clr enabled',1
exec master.dbo.sp_configure 'Database Mail XPs',1
exec master.dbo.sp_configure 'show advanced option', 0;
RECONFIGURE WITH OVERRIDE

EXECUTE [HCITools].[dbo].[apssys_CLR_Triapharm_Database_Tools] 
GO