Shouldn't -in
/ -contains
/ -eq
... yield the expected results with PSCustomObject's?
#20647
sba923
started this conversation in
Enhancements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This yields the expected results:
that is:
OTOH, this doesn't--if you ask me, that is:
The output is:
This is probably linked to the fact the individual comparisons are made on the object references, not on the actual data:
There is at least one way to work around this:
But this is way from obvious, not to mention that one must explicitly specify the list of properties to compare (is there a way to avoid this, BTW?).
Shouldn't those operators behave "the expected way"?
Beta Was this translation helpful? Give feedback.
All reactions