title: Expanding System.Object[] for Export to CSV
body: <p>Hello again and sorry!</p>
  <p>To keep it really short. What am i doing wrong?
  Im attempting to export a list of users filtered by using a customobject to a CSV and it outputs it into the same block. Is there no way to change this? I only ask because, all the other pages ive looked at it keeps telling me to use <code>-join</code>, to join them as strings which does the exact same thing. Is it not possible to output it as multiple rows for each user?</p>
  <pre><code>$GPMem = Get-ADGroupMember -Identity security.group | Select-Object -ExpandProperty Name 
  [array]$TPpl = $GPMem | Where-Object {$_ -like &quot;T*&quot;} 
  [array]$RPpl = $GPMem | Where-Object {$_ -like &quot;r*&quot;} 
  [array]$CPpl = $GPMem | Where-Object {$_ -like &quot;c*&quot;} 
  
  [pscustomobject]@{
  
      TPeople = (@($TPpl) |Out-String).Trim() 
      TPCount = $TPpl.Count
      RPeople = (@($RPpl) |Out-String).ToString()
      RPCount = $TPpl.Count
      CPeople = $CPpl
      CPCount = $TPpl.Count
  
  
      } | Export-Csv -Path C:\Users\abraham\Desktop\csv.csv -NoTypeInformation -Force
  </code></pre>
  <p><a href="https://i.stack.imgur.com/M18u0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M18u0.png" alt="enter image description here" /></a></p>