I am trying to read the data and write it into a .txt file using PowerShell.
But the in the result it get trimmed.
#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
How I can format the data?