title: Formatting data in PowerShell
body: <p>I am trying to read the data and write it into a .txt file using PowerShell. </p>
  
  <p>But the in the result it get trimmed.</p>
  
  <pre><code>#Get the photo path of the students 
  $commandAD = $connection.CreateCommand()
  
  #Retrieving student photo records.
  $commandAD.CommandText = "SELECT [Barcode],[ImageURL]   FROM 
  [iSAMS_Custom].[dbo].[vwDestinyLibrary_Student_photo1]"
  $resultPhoto = $commandAD.ExecuteReader()
  $tablePhoto = new-object "System.Data.DataTable"
  $tablePhoto.Load($resultPhoto)
  
  #Export Hash Table to Txt File
  $tablePhoto | Out-File c:\Users\nimmy.pk\Documents\inputphoto.txt 
  </code></pre>
  
  <p>How I can format the data?</p>