Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Export-csv string[]

$
0
0

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.



Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>