Skip to content

Instantly share code, notes, and snippets.

@ZeusAFK
Created May 27, 2014 00:06
Show Gist options
  • Save ZeusAFK/add58c009caeb07f0f8e to your computer and use it in GitHub Desktop.
Save ZeusAFK/add58c009caeb07f0f8e to your computer and use it in GitHub Desktop.
Enable xp_cmdshell in MSSQL to execute windows commands
USE master
GO
EXEC sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO
EXEC sp_configure 'xp_cmdshell', 1
GO
RECONFIGURE
GO
EXEC xp_cmdshell 'ipconfig'
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment