list SMTP Address using powershell

Anonymous
2016-08-17T16:46:43+00:00

I have Multiple SMPT Example 123.com 456.com but i need a list of a 456.com only  SMTP

what will be power shell command

get-mailbox | select primarysmtp

Microsoft 365 and Office | Subscription, account, billing | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} vote
Answer accepted by question author
  1. Anonymous
    2016-08-17T17:44:37+00:00

    Sounds like you need to search your recipients in Exchange Online and find the mailboxes that match a certain domain name such as 456.com.

    This should be the command that you can use to get that info.   First you should Connect to Exchange Online using PowerShell.

    Then you can run this command:

    • Get-Mailbox | Where {$_.emailaddresses -like "*456.com*"} | FL  Name,Alias,EmailAddresses

    If you need to export to a file use the command below:

    • Get-Mailbox | Where {$_.emailaddresses -like "*456.com*"} | FL  Name,Alias,EmailAddresses | Export-Csv c:\path\tofile.csv
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2016-08-19T16:08:36+00:00

    Hi Armando,

    Have @Brently’s suggestion addressed your concern? If not, to ensure you receive the professionally assistance, I suggest you post this question on our script forum.

    Regards,

    Toby

    0 comments No comments