I have an SSIS dtsx package that I want to run using PowerShell. Below is what I am running in powershell.
EXEC xp_cmdshell '"C:\Program Files\Microsoft SQL Server\130\DTS\Binn\DTExec.exe" /f "F:\SqlExport\New package.dtsx"'
Unfortunately I get the below error, and I dont know why
EXEC : The term 'EXEC' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + EXEC xp_cmdshell '"C:\Program Files\Microsoft SQL Server\130\DTS\Binn ... + ~~~~ + CategoryInfo : ObjectNotFound: (EXEC:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
I have enabled the xp_cmdshell
in SQL Server using below command as well