Granting PUBLIC permissions will cause you grief. : xp_cmdshell « System Settings « SQL Server / T-SQL Tutorial






The syntax of this stored procedure is xp_cmdshell "command"[,no_output]   

 
xp_cmdshell "dir c:\"








26.44.xp_cmdshell
26.44.1.Granting PUBLIC permissions will cause you grief.
26.44.2.output the contents of the root directory of the server to the console.