With the described configuration, I have a SQL Agent Job that includes a Powershell step. That step throws an error when it gets to the line

$app = start-process -passthru $program $program_args

saying -

"The error information returned by PowerShell is: 'The term 'start-process' 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. '. Process Exit Code -1. The step failed."

The lines preceding this seem to work ok. I suspect that the Powershell host that is running the script is crippled regarding that function but I am not able to verify this anywhere.


That's correct start-process isn't available in the sqlps mini-shell. You can determine by running get-command:

 SQLSERVER:\>get-command start-*

You could try running a cmdexec job step calling powershell.exe.

  • It's disappointing that CMD is still superior in that regard. Everytime I try to use Powershell for anything useful, I find myself reverting to batch files. – Jeff Sacksteder May 25 '12 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.