mail contact syntax

Roger Roger 7,181 Reputation points
2024-06-12T04:45:45.5466667+00:00

Hi all,

I want to create a mail contact using Exchange Online PowerShell. Is the syntax below correct? Let's say my domain is contoso.com. I have an external user whose alias is ******@somedomain.com. On my side, if I choose the alias as someuser.ext, will it create ******@contoso.onmicrosoft.com or ******@contoso.com? I want it to be ******@contoso.com.

New-MailContact  -FirstName "FN" -LastName "LN Ext" -DisplayName "FN-LN Ext" -Alias someuser.ext -ExternalEmailAddress ******@somedomain.com

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

Accepted answer
  1. Anonymous
    2024-06-12T09:47:07.9533333+00:00

    Hi, Roger Roger

    With the command you provided, the syntax is correct through my tests, and I have successfully created a mail contact. The result is shown below.

    6.12

    When you create an alias for external users in your domain, the resulting email address typically follows the primary domain format that you set up for your organization in Microsoft 365.

    If your primary domain is contoso.com, then the alias you create will often generate an email address like ******@contoso.com.

    If my answer is helpful to you, please mark it as the answer so that other users can refer to it. Thank you for your support and understanding.


0 additional answers

Sort by: Most helpful

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.