title: PowerShell: Import-CSV with no headers and remove partial duplicate lines
body: <p>I have a log file that is formatted as a CSV with no headers. The first column is basically the unique identifier for the issues being recorded. There may be multiple lines with different details for the same issue identifier. I would like to remove lines where the first column is duplicated because I don't need the other data at this time. </p>
  
  <p>I have fairly basic knowledge of PowerShell at this point, so I'm sure there's something simple I'm missing.</p>
  
  <p>I'm sorry if this is a duplicate, but I could find questions to answer some parts of the question, but not the question as a whole.</p>
  
  <p>So far, my best guess is:</p>
  
  <pre><code>Import-Csv $outFile | % { Select-Object -Index 1 -Unique } | Out-File $outFile -Append
  </code></pre>
  
  <p>But this gives me the error:</p>
  
  <blockquote>
    <p>Import-Csv : The member "LB" is already present.
    At C:\Users\jnurczyk\Desktop\Scratch\POImport\getPOImport.ps1:6 char:1
    + Import-Csv $outFile | % { Select-Object -InputObject $_ -Index 1 -Unique } | Out ...
    + ~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Import-Csv], ExtendedTypeSystemException
        + FullyQualifiedErrorId : AlreadyPresentPSMemberInfoInternalCollectionAdd,Microsoft.PowerShell.Commands.ImportCsvCommand</p>
  </blockquote>