Search for users using a specific forward address in Exchange

Christopher Freeland 41 Reputation points
2021-03-05T11:17:43.747+00:00

Good morning.

I have a PowerShell command here to show all the forwarding rules in an Exchange environment but I am looking to search for a specific target domain rather than all forwarding rules. The target forward domain is an external one.

Get-Mailbox -ResultSize Unlimited | Where {($_.ForwardingsmtpAddress -ne $Null)} | Select Name, ForwardingsmtpAddress, DeliverToMailboxAndForward

If I was looking for rules that only forwarded to *@Karima ben .com how would I incorporate that into the command?

Any help would be appreciated greatly. Thanks,

Christopher

Exchange Exchange Server Management
0 comments No comments
{count} votes

Accepted answer
  1. Andy David - MVP 157.4K Reputation points MVP Volunteer Moderator
    2021-03-05T12:01:41.57+00:00

    that wont find all the forwarding rules, just the ones set on the mailbox itself by an admin or via OWA

    Get-Mailbox -ResultSize Unlimited | Where {($_.ForwardingsmtpAddress -match '@hotmail.com')} | Select Name, ForwardingsmtpAddress, DeliverToMailboxAndForward
    
    0 comments No comments

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.