I have a csv that I want to remove a few characters from for further processing. I've done this many times before using the regex -replace method, but this time it seems to be messing up the whole csv. I'm using:
$Removed_Characters=$Good_CSV|%{$_ -replace "X",""}
Instead of the same csv without the "X" character, this outputs a series of arrays, one for each row (ie @{Name=Tom, ID=12}@{Name=Bill, ID=15}...). This is not at all what I want, and not what I've seen in the past. What could I be doing differently?