Update email contact fields

Wayne Sheffield 1 Reputation point
2021-06-30T17:28:33.467+00:00

We are needing to update all of the contact fields. Is there a command line command, or a quick way to update them? It is more that just the office address, phone numbers have changed also.

Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,334 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. KyleXu-MSFT 26,206 Reputation points
    2021-07-01T02:19:16.49+00:00

    @Wayne Sheffield

    Do you want to modify Contact information for "User Mailbox" or "Mail Contact"?

    All in all, you need to prepare a source file which contain the information about "the target object", "Value for Office", "Value for phone". Such as:
    110740-1.png

    If you want to modify information for mail Contact, you can use command below:

    Import-Csv c:/temp/source.csv | %{Set-Contact -Identity $_.Name -MobilePhone $_.phone -Office $_.Office}  
    

    If you want to modify information for contact information for user mailbox, you can use command below:

    Import-Csv c:/temp/source.csv | %{Set-User -Identity $_.Name -MobilePhone $_.phone -Office $_.Office}  
    

    You can also add other attributes to above command if you want to change it. Before that, use "Get-Contact" and "Get-User" command to check whether that attribute exist for above command.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.