Create a table, or an array of lists in PowerShell

PHOTO EMBED

Wed Jul 09 2025 01:33:11 GMT+0000 (Coordinated Universal Time)

Saved by @baamn

$A = @()
ForEach ( $Thing in $Things )
    {
    $A += [pscustomobject]@{
        Name  = $Thing.Name
        Color = $Thing.Color
        AsOf  = Get-Date }
    }
$A | Export-CSV -Path $CSVPath -NoTypeInformation
content_copyCOPY

https://www.reddit.com/r/PowerShell/comments/ih6ooa/create_a_table_or_an_array_of_lists_in_powershell/