Wednesday, 2 October 2013

PowerShell CSV manipulation

PowerShell CSV manipulation

I have a .csv file that contains usernames in the first column. They are
in the form of FirstName LastName. I want to take the FirstName and add
the first character of the LastName onto it, and delete the space. I then
want to add @someemailaddress.com.
Here is the example:
This is what I have:
DisplayName, OtherColumn
Sam Jones, otherdata
Paul Jones, otherdata
This is what I want:
DisplayName, OtherColumn
SamJ@someemailaddrses.com, otherdata
PaulJ@someemailaddress.com, otherdata
Ideas?

No comments:

Post a Comment