Change the assignment of $sqlParameters to
$sqlParameters=(("id=1", "val1=2"), ("id=2", "val1=3"))
You need a nested array so that you can pick one pair at a time.
And in the call to InvokeSqlcmd change $sqlParameters
to $i
, the looping variable.
And while not required, you could change IN
in the SQL script to a plain =
.