create contact

Roger Roger 7,181 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:******@contoso.com
OU: "OU=Contacts,DC=contoso,DC=com"

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,178 questions
Exchange | Exchange Server | Other
Exchange | Exchange Server | Management
Exchange | Hybrid management
Exchange | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jarvis Sun-MSFT 10,231 Reputation points Microsoft External Staff
    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:******@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.