I want to display a hashtable in PowerShell and I want to use an array to fill one of the columns.
Basically, what I have is this:
$Servers = "training01.us", "training02.us", "training03.us"
#Table
$table = @(@{ColumnA="$Servers";ColumnB=online})
$table.ForEach({[PSCustomObject]$_}) | Format-Table -AutoSize
What I would want it to do is display each server on a different row in the table. For example:
ColumnA ------- training01.us training02.us training03.us
But instead I get this displayed:
ColumnA ------- training01.us training02.us training03.us
How can I fix this?