Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

powershell output array as table

$table = @( @{ColumnA="Able";    ColumnB=1},
            @{ColumnA="Baker";   ColumnB=2},
            @{ColumnA="Charlie"; ColumnB=3} )

$table | ForEach {[PSCustomObject]$_} | Format-Table -AutoSize


ColumnA ColumnB
------- -------
Able          1
Baker         2
Charlie       3
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #powershell #output #array #table
ADD COMMENT
Topic
Name
5+8 =