create contact

Roger Roger 5,446 Reputation points
2023-04-23T17:26:00.1566667+00:00

Hi All I am using exchange 2016 Hybrid Environment. I want to create contact in exchange onprem using powershell. Please guide me with the syntax with the below information.

First Name: Test
Last Name: user1
Display Name: Test User1
Name: Test User1
alias:test.user1.external
External Email Address: SMTP:test.user1@contoso.com
OU: "OU=Contacts,DC=contoso,DC=com"

Microsoft Exchange Online
Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
1,200 questions
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,510 questions
Microsoft Exchange
Microsoft Exchange
Microsoft messaging and collaboration software.
467 questions
Microsoft Exchange Hybrid Management
Microsoft Exchange Hybrid Management
Microsoft Exchange: Microsoft messaging and collaboration software.Hybrid Management: Organizing, handling, directing or controlling hybrid deployments.
2,008 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jarvis Sun-MSFT 10,186 Reputation points Microsoft Vendor
    2023-04-24T07:07:43.8666667+00:00

    Hi @Roger Roger ,  

    By my experiments, below are the Powershell commands and results you need to create contact:

    New-MailContact -Name "Test User1" -ExternalEmailAddress "SMTP:test.user1@contoso.com" -Alias "test.user1.external" -DisplayName "Test User1" -FirstName "Test" -Lastname "user1" -OrganizationalUnit "OU=Contacts,DC=contoso,DC=com"
    

    User's image

    Reference: New-MailContact (ExchangePowerShell) | Microsoft Learn


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".  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.