Setting a DisplayName of Lastname, Firstname using CSV Parser

Several customers I have spoken with recently want to use the CSV Parser PowerShell script with a CSV file to set the DisplayName attribute for user mailboxes to LastName, FirstName… for example: Smith, John.

To do this, you basically need to put double quotes around the field data… for example, you might end up with a csv file that looks like this:

Action,Type,Name,EmailAddress,FirstName,LastName,DisplayName,Password,ForceChangePassword
Add,Mailbox,JohnSmith,jsmith@contososchool.info,John,Smith,"Smith, John",111111,0
Add,Mailbox,JackJones,jjones@contososchool.info,jack,Jones,"Jones, Jack",111111,0

The trick is, if you are working on the csv file in Excel is that you should NOT include the quotes.  Excel will add these when you save the file as a CSV file.

You can then run CSV Parser as normal.  It pays to check the final format of the CSV file before you use it to run an upload… get the format the wrong way, and CSV Parser might fail, or you might get unwanted quotation marks in the Display Name.

Jonny

Technorati Tags: ,

Advertisements

2 Responses to Setting a DisplayName of Lastname, Firstname using CSV Parser

  1. Mike says:

    I tried to do an Action = Update for a batch of students to changetheir names but it did not take..any suggestions?

  2. US LiveAtedu says:

    @Mikei would need to understand more about what you are seeing here… contact me directly at jonncha AT microsoft.com and I will see what I can do.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: