title: Exporting data from a foreach loop (Get-QADUser)
body: <p>I would like output from the following snippet as a text file. How do I accomplish this?</p>
  
  <pre><code>$users = Import-Csv Y:\Temp\list2.csv
  
  foreach ($user in $users) {
      Get-QADUser -lastname $user.lastname -firstname $user.firstname | select firstname,lastname,mobile,primarysmtpaddress,logonname 
  }
  </code></pre>