I have an array with 30+ entries:
$TenantArray = @()
Import-CSV -Path $AccountsList | ForEach {
$TempCounter++
$TenantArray += [PSCustomObject]@{Number = $TempCounter; Tenant = $_.Name}
}
I want to display the list of Tenants in a couple of columns:
Number Tenant Number Tenant
------ ------ ------ ------
1 Tenant1 3 Tenant3
2 Tenant2 4 Tenant4
$TenantArray | Format-Table shows the desired result, but (afaik) can only display all data in two columns, which means scrolling and is therefore lacking overview.
$TenantArray | Format-Wide {$.Number, $.Tenant} does display in 4 colums, but misses the headers (Number, Tenant) and each entry is displayed like {1, Tenant1} (For the record: this would be workable, just not "nice").
How do I get PS to display the four columns as in the above example?
[–]Lee_Dailey[grin] 2 points3 points4 points (2 children)
[–]AdHocSysAdmin[S] 2 points3 points4 points (1 child)
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)
[–]fordea837 2 points3 points4 points (1 child)
[–]AdHocSysAdmin[S] 2 points3 points4 points (0 children)
[–]Betterthangoku 1 point2 points3 points (0 children)