We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Export-Csv
ConvertTo-Csv
[psobject]
Note:
& { [psobject]::new() | Select-Object @{Name = "Groups"; Expression = { 'a', 'b', 'c' } } [pscustomobject] @{ Groups = 'a', 'b', 'c' } } | ConvertTo-Csv
"Groups" "a b c" "a b c"
"Groups" "a b c" "System.Object[]"
That is, without the incidental [psobject] wrapper, simple .ToString() stringification was applied.
.ToString()
No response
PowerShell 7.4.0-preview.6
Prerequisites
Steps to reproduce
Note:
[psobject]-wrapped value makes more sense.Export-Csv/ConvertTo-Csvto better stringify complex properties #20383[psobject]wrapper.Expected behavior
Actual behavior
That is, without the incidental
[psobject]wrapper, simple.ToString()stringification was applied.Error details
No response
Environment data
Visuals
No response