mail contact syntax

Roger Roger 7,326 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 cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.
Exchange | Exchange Server | Other
Exchange | Exchange Server | Other
A robust email, calendaring, and collaboration platform developed by Microsoft, designed for enterprise-level communication and data management.Miscellaneous topics that do not fit into specific categories.
Exchange | Hybrid management
Exchange | Hybrid management
The administration of a hybrid deployment that connects on-premises Exchange Server with Exchange Online, enabling seamless integration and centralized control.
0 comments No comments
{count} votes

Answer accepted by question author
  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' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.