I have some code that pulls from an API into a variable called $table. I can export this variable to a csv with no issues, except the last field in the table ($table.userdefinedfields) exports as a SystemObject[].
What I would like is a 3 column table consisting of the 1st and 3rd fields of $table and the 29th field of the SystemObject[].
I am not too well versed in powershell, but this must be possible.
Any ideas?
SystemObject[]means Array of Elements, CSV file can show only single string elements, the fast and easy solution is to join the Array elements with a comma (or any other character), for example$table.userdefinedfields -join ","and then export it again, if you need more precise solution, add your code to the question