私はデータを読み込み、powershellを使用して.txtファイルに書き込もうとしています。 しかしその結果、それはトリミングされます。powershellでデータをフォーマットする
#Get the photo path of the students
$commandAD = $connection.CreateCommand()
#Retreving 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
どのようにデータをフォーマットできますか?あなたはアウトファイルから-Widthパラメータを使用することができます
csvファイルとして保存するには、そのオブジェクトがテーブル – guiwhatsthat
あるように私は今、TXT形式 –