title: PowerShell Select Replace Carriage Returns AD StreetAddress Not Working
body: <p>I'm trying to remove all carriage returns from AD streetaddress attribute from output of export-csv file using </p>
  
  <pre><code>select @{Name="StreetAddress"; Expression= {$_.StreetAddress -replace '`r `n', "|"}} | export-csv C:\file.csv -notype -append
  </code></pre>
  
  <p>but it is acting very inconsistently and doesn't do this action to all the records. Does anyone know of a better, more reliable way? Apparently, a vendor app can't load data if it has a carriage return in it? I'm going to try Out-File next. Thx</p>