xp_cmdshell
Spawns a Windows command shell and passes in a string for execution. Any output is returned as rows of text.
What changes
- Input
- Not stated in the Microsoft summary.
- Output or change
- Not stated in the Microsoft summary.
Syntax at a glance
xp_cmdshell { 'command_string' } [ , NO_OUTPUT ]
Work example
Spawns a Windows command shell and passes in a string for execution. Any output is returned as rows of text.
Read the permission and security notes. Describe the host or instance effect without running the procedure.
Check your work Which external resource or server capability could this procedure reach?
Open Microsoft Learn for full syntax, permissions, and details for your version.