rmbolger/Posh-IBWAPI

ObjectRef in Get-IBObject takes a string[], but only returns the first result

rmbolger opened this issue · 0 comments

If you send a string array of object references via the pipeline, everything works.

@('ref1','ref2','ref3') | Get-IBObject

But if you use that same array with -ObjectRef, only the first item in the array is returned.

Get-IBObject -ObjectRef @('ref1','ref2','ref3')

This is a bug due to my newbie understanding of how pipeline input works. Rather than fix it so the array can be used in both places, I'm going to take the easy way out and change the input type for -ObjectRef to be a single string rather than a string array. You can still use the pipeline method to query multiple objects. And while this would technically be a breaking change if it was working as originally intended, I'm going to ignore that since it never worked in the first place.