Given
$a = (("a","b","c"),("d","e","f"))
I want $a exported to a csv file like this
a,b,c
d,e,f
Something so simple seems tricky. What's the best way, my file will be less than 40 lines long.
Try this
$a | % { $_ -join ','} | out-file .\myfile.csv
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With