Change a value in column of a CSV file

Question:

I’m trying to find a way to change the value of all the entries in the ‘Available Person’ column in my csv file using PowerShell.

If the value is ‘Y’ it should be changed to ‘1’ and if the value is ‘N’ it should be changed to ‘)’:

Here’s what I’ve tried:

Answer:

Here is some example code for how you might solve this with a Switch statement

Source:

Change a value in column of a CSV file by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply