title: Compare Two CSVs, match the columns on 2 or more Columns, export specific columns from both csvs with powershell
body: <p>i Have 2 CSV's</p>
  
  <p>left.csv</p>
  
  <pre><code>Ref_ID,First_Name,Last_Name,DOB
  321364060,User1,Micah,11/01/1969
  946497594,User2,Acker,05/28/1960
  887327716,User3,Aco,06/26/1950
  588496260,User4,John,05/23/1960
  565465465,User5,Jack,07/08/2020
  </code></pre>
  
  <p>right.csv</p>
  
  <pre><code>First_Name,Last_Name,DOB,City,Document_Type,Filename
  User1,Micah,11/01/1969,Parker,Transcript,T4IJZSYO.pdf
  User2,Acker,05/28/1960,,Transcript,R4IKTRYN.pdf
  User3,Aco,06/26/1950,,Transcript,R4IKTHMK.pdf
  User4,John,05/23/1960,,Letter,R4IKTHSL.pdf
  </code></pre>
  
  <p>End Results:</p>
  
  <p>Combined.csv</p>
  
  <pre><code>Ref_ID,First_Name,Last_Name,DOB,Document_Type,Filename
  321364060,User1,Micah,11/01/1969,Parker,Transcript,T4IJZSYO.pdf
  946497594,User2,Acker,05/28/1960,Transcript,R4IKTRYN.pdf
  887327716,User3,Aco,06/26/1950,Transcript,R4IKTHMK.pdf
  588496260,User4,John,05/23/1960,Letter,R4IKTHSL.pdf
  </code></pre>
  
  <p>I need to match them on First_Name,Last_Name,DOB then return Ref_ID, first_name, last_name, DOB from the left.csv and Document_Type,Filename from the right.csv</p>
  
  <p>Use Compare-Object: that only returns columns from one of the csvs, not columns from both.</p>
  
  <p>Use <a href="https://github.com/RamblingCookieMonster/PowerShell/blob/master/Join-Object.ps1" rel="nofollow noreferrer">join-object</a>: This was my great hope, but that only lets me match on one Column, I need to match multiple Columns (cant figure out how to do Multiple)</p>
  
  <p>Im not sure where to go from here, open to suggestions.</p>