How to Execute a PowerShell Script from SSIS


Does anyone know how to execute a PowerShell script from SSIS? I have created the script and it works from from the command line. The script takes a couple of command line parameters, which work fine when called from cmd.exe.

I’m using an Execute Process Task in SSIS and cannot get the script file to execute. I’m using expressions to pass in the name of the script and the command line arguments. The task is returning an incomplete string token error.


From VS to launch PSH with an extra script (for a Cmdlet project) I use the following commandline:

The -noexit will keep the instance around (so you wouldn’t want that), putting all the real commands in a script to be dot-sourced avoids a really long command line.


How to Execute a PowerShell Script from SSIS by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply