re : How do I get the names of all Mailboxes forwarding to a certain recipient.

Midiman 71 Reputation points
2021-11-10T16:32:07.777+00:00

Hi,

How can I get the names of all Mailboxes in my Tenant that are forwarding to a certain recipient?

i.e

Get-Mailbox names where forwarding address like "bob123@Company portal .com"

Thanks

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,346 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 44,621 Reputation points
    2021-11-10T19:29:16.337+00:00

    I think you'll get a better response by adding office-exchange-online-itpro as a tag to your original post.

    For an On-Prem organization, something like this might work:

    Get-Mailbox -ResultSize Unlimited -RecipientTypeDetails UserMailbox |
        Select-Object UserPrincipalName,ForwardingSmtpAddress,DeliverToMailboxAndForward
    

    But Exchange Online has restrictions that you may exceed by using "normal" cmdlets. Check for a Get-EXOMailbox cmdlet.

    0 comments No comments