How to execute PowerShell Script from SSIS

Does anyone know how to execute a PowerShell script from SSIS? I created a script and it works from the command line. The script accepts several command line options that work fine when called from cmd.exe.

I am using the run task in SSIS and cannot execute the script file. I use expressions to pass the script name and command line arguments. The task returns an invalid row token error.

+5
source share
1 answer

From VS to running PSH with an additional script (for the Cmdlet project), I use the following command line:

powershell -noexit -command ". ./Startup.ps1"

. -noexit ( ), script , .

+4

All Articles