데이터를 읽고 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
어떻게 데이터를 포맷 할 수 있습니까? 당신은 아웃 - 파일에서 - 폭 매개 변수를 사용할 수 있습니다
를 CSV 파일로 저장, 개체가 테이블 – guiwhatsthat
처럼 지금 TXT 형식 –