Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Add comma in Excel

$
0
0

I have a CSV file that has this format.    

LName    FName

Then each each column I have a list of users names.   I need to add a comma at the end of each Last Name.   I've googled this but have not found what I'm looking for.    this is incomplete code:

get-content"U:\Reports\AD\Get SamAccount\hr.csv"
| foreach-object { $_-replace','}
| set-content"U:\Reports\AD\Get SamAccount\hr2.csv"

is this the right approach or do I need a different method?

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles