title: Powershell Export-to-CSV of array providing array properties
body: <p>This code:</p>
  
  <pre><code>$concerningMachines = @()
  foreach($aMachine in $machineRecords.GetEnumerator())
  {
      if($aMachine.Value.ReviewScore -gt $averageAboveAverage)
      {
          $machine = New-Object -TypeName PSObject
          $machine | Add-Member -MemberType NoteProperty -Name MachineName -Value $aMachine.Key
          $machine | Add-Member -MemberType NoteProperty -Name ManagedBy -Value $aMachine.Value.ManagedBy
          $machine | Add-Member -MemberType NoteProperty -Name LastLogin -Value $aMachine.Value.LastLogin
          $machine | Add-Member -MemberType NoteProperty -Name ReviewScore -Value ($aMachine.Value.ReviewScore / $averageAboveAverage * 100)
          $concerningMachines += $machine
      }
  }
  
  Export-Csv -InputObject $concerningMachines -Path C:\DG\ConcerningMachines.csv -NoTypeInformation
  </code></pre>
  
  <p>Produces this .csv file:</p>
  
  <blockquote>
    <p>"Count","Length","LongLength","Rank","SyncRoot","IsReadOnly","IsFixedSize","IsSynchronized"
    "43","43","43","1","System.Object[]","False","True","False"</p>
  </blockquote>
  
  <p>...Which is the properties of the array, and not the members of the array. Googling the only advice I find seems to either implement a solution that entire ignores Export-Csv, is dealing with strings (which while collections of characters, the solutions aren't applicable) or appear to be doing exactly what I'm already doing but produce a valid CSV file (I can find some links if needed, but they're forum conversations, not explicit guides).</p>
  
  <p>How do you properly export an array of PSObjects into a CSV files, and avoid the above unintended output?</p>