locked
How to import contacts from CSV file into Exchange 2010 - including fields Office and Department RRS feed

  • Question

  • Hello,

    Could you please help about the following question?

    How to import contacts from CSV file into Exchange 2010 - including fields Office or Department?

    Because it is limited in commands of Shell. So I don't know if there are other ways to import them.

    For example, we can use scripts, or C# which can import them with field Office or Department.

    Because I think we based on fields that they are exist in contact object of exchange server. it include fields Department, Office, etc.

    Thanks in advance,

    Peace.

     

    Thursday, November 25, 2010 3:46 AM

Answers

  • Hi Peace,

    You can try this way:

    Create a csv file c:\contact.csv, file format should be:

    name,emailaddress,office,department

    a,a@a.com,aa,ab

    ...

    Run the cmdlet

    Import-csv c:\contact.csv | foreach {new-mailcontact -name $_.name -externalemailaddress $_.emailaddress;set-contact -identity $_.name -office $_.office -department $_.department}


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Marked as answer by emma.yoyo Thursday, December 2, 2010 3:21 AM
    Monday, November 29, 2010 8:25 AM

All replies

  • Hi Peace,

    You can try this way:

    Create a csv file c:\contact.csv, file format should be:

    name,emailaddress,office,department

    a,a@a.com,aa,ab

    ...

    Run the cmdlet

    Import-csv c:\contact.csv | foreach {new-mailcontact -name $_.name -externalemailaddress $_.emailaddress;set-contact -identity $_.name -office $_.office -department $_.department}


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Marked as answer by emma.yoyo Thursday, December 2, 2010 3:21 AM
    Monday, November 29, 2010 8:25 AM
  • Hi Peace,

    Any updates on your issue?


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Wednesday, December 1, 2010 1:54 AM
  • Thank you very much for your information, Frantk Wang.
    Wednesday, December 1, 2010 5:54 AM
  • Hi,

    Will this work if I want to update the info for already created mailboxes?

    Thanks,

    Aseel

    Wednesday, April 1, 2015 11:30 AM
  • Perfect. Thanks much!
    Monday, November 30, 2015 11:21 PM