vendredi 31 mars 2017

Conditional IFs in powershell to populate a column in csv

let's say I have a csv with:

 A,B,C,D
1,2,a,
1,2,b,
1,2,a,
1,2,c,

I want to populate the last column D with conditional values based on the values in the column C.

in excel that would be like (if C2 = a,value1,if(C2=b,value2, if C2=c,value 3...etc.

How can I achieve something as simple as this in PS??

Aucun commentaire:

Enregistrer un commentaire