Lazy Diary @ Hatena Blog

PowerShell / Java / miscellaneous things about software development, Tips & Gochas. CC BY-SA 4.0/Apache License 2.0

Entries from 2017-11-11 to 1 day

Convert an array to CSV with PowerShell

Problem You cannot convert an array with just pipeline the array to ConvertTo-Csv. PS > $array = ("a", "b", "c", "a", "d") PS > $array | ConvertTo-Csv "Length" "1" "1" "1" "1" "1" ... or just passing the array to ConvertTo-Csv. PS > Conver…