Hi @David Stark
Syntax: xp_cmdshell { 'command_string' } [ , no_output ]
command_string is varchar(8000) or nvarchar(4000), with no default.
''powershell.exe' is not recognized as an internal or external command, operable program or batch file.
This error mostly because xp_cmdshell cannot contain more than one set of double quotation marks. See: xp_cmdshell (Transact-SQL)
Best regards,
Cosmog Hong
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.