Hi all,
I'm trying to use the RemoveDependencies verb from the Orion.Dependencies entity.
It's asking for an array of integers (System.Int32[]) and I tried doing the following:
- Passing the array of DependencyID values in via pipe (e.g., $depIDs | Invoke-SwisVerb...)
- Passing them as an argument (below).
- Passing them in one at a time in their own single element array (below).
Option #1
$depIDs | Invoke-SwisVerb $swis Orion.Dependencies RemoveDependencies
Option #2
$depIDs = Get-SwisData $swis 'SELECT DependencyID FROM Orion.Dependencies' Invoke-SwisVerb $swis Orion.Dependencies RemoveDependencies $depIDs
Option #3
$depIDs = Get-SwisData $swis 'SELECT DependencyID FROM Orion.Dependencies' foreach ($id in $depIDs) { Invoke-SwisVerb $swis Orion.Dependencies RemoveDependencies @($id) }
Option #1 complains about a missing parameter and options #2 and #3 complain about not being able to unpack argument 0.
Thanks for the help in advance!