0
我想輸出到文本文件powershell cmdlet的結果Compare-Object
問題是我無法消除橢圓截斷。從表輸出中刪除橢圓
下面的代碼提供了一個表格格式定義變量,它指定了Path列的寬度1000。然而,輸出文件總是以122個字符截斷Path列。
Compare-Object
cmdlet正在比較兩個ArrayList,它們只是兩個服務器之間公用文件夾路徑的文件路徑字符串列表。
我試圖做的是把SideIndicator作爲第一列和第二列的完整路徑。我不想截斷文件路徑。
$tableFormat = @{Expression={$_.SideIndicator};Label="Side Indicator";width=15}, @{Expression={$_.InputObject};Label="Path";width=1000}
$outputFilename = ($server1 + "_" + $server2 + "_FileCompare" + ".txt");
Compare-Object $Hive1FileArray $Hive2FileArray -IncludeEqual | Format-Table $tableFormat | Out-String | Out-File $outputFilename
我還試圖消除Out-String
從管道沒什麼區別。
這裏怎麼回事?
感謝