I'm saving properly using Export-CSV in powershell 2 but I want it to include everything, I want empty values if it's empty.
$list | Export-Csv -Path (Get-SaveFile) -NoTypeInformation;
The documentation for Export-CSV:
When you submit multiple objects to Export-CSV, Export-CSV organizes the file based on the properties of the first object that you submit. If the remaining objects do not have one of the specified properties, the property value of that object is null, as represented by two consecutive commas. If the remaining objects have additional properties, those property values are not included in the file.
I can't simply organize the list either because there are two things that may have 0 or more values. For some objects there are comments, and some have links, some have both. But I need 1 column per link and 1 column per comment regardless of how many, or none, there are.
Is there a different cmdlet that achieves this export-csv style where no fields are ignored?
Edit with answer: This PowerShell Snippet from iRon was exactly what I needed to override the property truncation of Export-CSV. https://powersnippets.com/union-object/ Thanks for the help!