import-csv ignore ,

by Jul 30, 2014

Hi there

i have a script that will enable lync users based on a list that will be imported from csv file

like this:

lastname,firstname

problem is the command im using to enable the users will take the whole display name and when i import the data using import-csv it detects the , and creates the data as seperate lastname TAB firstname

if i put " around lastname,firstname" i get the data the way i want(it ignores the , in the middle)

whats the easiest way to import it as as(last,first) ?

(forgot to say i get the data as lastname,firstname so its easier for me to just copy paste it into that csv or txt file and let script figure it out otherwise i have to seperate it myself)

Thanks