Parameters don't seem to work for me

Nov 6, 2009 at 1:48 AM
Edited Nov 6, 2009 at 1:50 AM

I am sure I am doing something wrong but not sure what.  I have tried to use your PowerShell task but it keeps telling me I am not passing in the parameters.

Here is the script I am trying to execute ...

F:\Builds\SSISDeployment\ssis-generate.ps1 -oldVersion -src F:\Build\TestTask\Drop\SSIS\

The first line of the script looks like this...

Param([string]$oldVersion, [string]$src)

I have tried...

<Powershell Script="f:\Builds\SSISDeployment\ssis-generate.ps1" Arguments="oldVersion=;src=$(SSISDropLocation)" />

<Powershell Script="f:\Builds\SSISDeployment\ssis-generate.ps1" Arguments="value1=;value2=$(SSISDropLocation)" />

<Powershell Script="f:\Builds\SSISDeployment\ssis-generate.ps1" TaskItems="$(oldVersion);$(src)" />


<Powershell Script="f:\Builds\SSISDeployment\ssis-generate.ps1" TaskItems="$(Argument1);$(Argument2)" />

All of these give the same result.  The script returns telling me I need to pass in the parameters.  What am I doing wrong?

Nov 6, 2009 at 3:12 PM

I figured out the problem.  When running an external script you need to use the "ScriptFile" attribute.  Although it briefly mentions this in the Usage link the schema that creates the intellisense is out-of-date so it does not show the ScriptFile attribute.

The correct form in my case is ...

<Powershell ScriptFile="f:\Builds\SSISDeployment\ssis-generate.ps1" Arguments="oldVersion=;src=$(SSISDropLocation)" />

Nov 6, 2009 at 3:20 PM

Oops. I'll update the schema.

Nov 6, 2009 at 3:40 PM

I've uploaded a new release that only contains the schema fix.