Export-csv string[] RRS feed

  • Question

  • Hi!

    I have powershell snap-in that produce a lot of output and many of properties are string[] objects. 

    I know that I can use command in this manner:

    Get-something | select P1,P2, {P3 -join ","} | export-csv my.csv -delimiter ";"

    But there are many properties like P3 that I would like to create like that without calling for each one as in previous example. Something like this pseudo-code:

    Get-Something | select * , { if string[] then -join "," } | export-csv....

    I searched all over the place and didn't found anything that would include such "automatic" solution.

    Thank you in advance.

    • Moved by Bill_Stewart Monday, June 30, 2014 5:07 PM Abandoned
    Monday, February 3, 2014 2:03 AM

All replies