create contact

Roger Roger 6,691 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,419 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,771 questions
Microsoft Exchange
Microsoft Exchange
Microsoft messaging and collaboration software.
645 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,211 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jarvis Sun-MSFT 10,216 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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.