from > https://stackoverflow.com/questions/20874464/format-table-on-array-of-hash-tables
Using Powershell V4:
$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
V2 solution:
$(foreach ($ht in $table)
{new-object PSObject -Property $ht}) | Format-Table -AutoSize