Closed iRon7 closed 1 year ago
$Department = ConvertFrom-Csv @'
"Name","Country"
"Engineering","Germany"
"Marketing","England"
"Sales","France"
"Purchase","France"
'@
Join $Department -on Country -Name *1,*2 # Or: $Department |Join -on Country -Name *1,*2
Name1 Name2 Country
----- ----- -------
Sales Purchase France
Purchase Sales France
To get same behavior as previous versions, use both the -on
and the -equals
parameter:
Join $Department -on Country -eq Country -Name *1,*2
Exclude identical objects (with the same index) on a self-join where the
-On
parameter is supplied and-equal
parameter is omitted On a self-join with only a-on
parameter and no-equal
parameter objects will always related to their self an therefore useless to include Where a self-join without an-on
parameter (on index) is completely useless and shouldn't be accepted