I am using ConvertTo-Csv to get comma separated output
get-process | convertto-csv -NoTypeInformation -Delimiter \",\"
It out
Here's another approach:
Get-Process | ConvertTo-Csv -NoTypeInformation -Delimiter "," |
foreach { $_ -replace '^"|"$|"(?=,)|(?<=,)"','' }
This replaces matches with the empty string, in each line. Breaking down the regex above:
| is like an OR, used to unite the following 4 sub-regexes^" matches quotes in the beginning of the line"$ matches quotes in the end of the line"(?=,) matches quotes that are immediately followed by a comma(?<=,)" matches quotes that are immediately preceded by a comma