title: PowerShell gather info
body: <p>I'm looking for a way to read csv file for header 'Customer' and 'Cars ID'. Issue is I have duplicate customer. I need to find a way to list each unique customer and all its cars id with it. If possible to export it as CustomerName and list all cars id under it. So if I have 3 unique customer, each customer will be export separately.</p>
  
  <pre><code>#Get unique customer
  $GetUniqCustomer = Import-Csv $File |
                     Sort-Object {$_.customer} -Unique |
                     Select {$_.customer}
  </code></pre>
  
  <p>From here on I'm not sure how I would do what I've described.</p>
  
  <p>This will list all carid under the specific.</p>
  
  <pre><code>Import-Csv $File | Where-Object {
      $_.customer -eq $Customer
  } | Select {$_."carid"}
  </code></pre>