启用和禁用xp_cmdshell

-- 允许配置高级选项

EXEC sp_configure 'show advanced options',1

GO

-- 重新配置RECONFIGURE

GO

-- 禁用xp_cmdshell

EXEC sp_configure 'xp_cmdshell', 1

GO

--重新配置RECONFIGURE

GO

原文地址:https://www.cnblogs.com/secbook/p/2654860.html