title: Tidy up output from combined command
body: <p>I am trying to tidy up the output of a command. Command is:</p>
  
  <pre><code>Get-ADComputer -LDAPFilter "(name=comput*)" -searchbase "ou=xx,dc=xx,dc=local" | 
  Add-ADPrincipalGroupMembership -MemberOf Group_name -passthru
  </code></pre>
  
  <p>I have used "Start-Transcript" to output to a file. But, each file gives:</p>
  
  <pre><code>DistinguishedName : CN=Computer1,OU=xx,DC=xx,DC=LOCAL
  Name              : Computer1
  ObjectClass       : computer
  ObjectGUID        : 11111111-1111-1111-1111-111111111111
  SamAccountName    : Computer1$
  SID               : S-1-5-21-1111111111-111111111-1111111111-111111
  </code></pre>
  
  <p>I'd ideally just like a list of "Name" from the command. </p>
  
  <p>Also, if possible can we change the start/stop-transcript to give a better date format than "End time: 20191010163001"</p>
  
  <p>Ideally I'd just like to output to a CSV instead so I can have the list in columns and just filter out what I don't need if it's easier. I don't know if I can use export-file instead to get a CSV?</p>