As an Exchange Admin, you probably receive requests to set forwarding on a mailbox. This could be for many reasons, but somewhere down the line, you get a request to provide all forwarders for a domain or for a mailbox.

To view the forwarders, you need to launch the Exchange Management Shell (EMS) and run the following command:

  • Get-Mailbox <mailbox> | fl ForwardingSMTPAddress,DeliverToMailboxandForward

As you can see above, it shows no forwarding set for this user, you can also run it for an Organizational Unit and have it return multiple users forwarding information:

  • Get-Mailbox -organizationalunit “OU=domainOU,DC=Domain,DC=local” | Where {$_.ForwardingAddress -ne $null} | Select Name, PrimarySMTPAddress, ForwardingAddress, DeliverToMailboxAndForward

As shown above, you can see where forwarding has been enabled as the value is set to True.

You can also export this to a .CSV file by running the following command:

  • Get-Mailbox -organizationalunit “OU=domainOU,DC=Domain,DC=local” | Where {$_.ForwardingAddress -ne $null} | Select Name, PrimarySMTPAddress, ForwardingAddress, DeliverToMailboxAndForward | Export-Csv “C:\users\user1\desktop\fowarders.csv” -NoTypeInformation

Hope it helps.

Views All Time
Views All Time
Views Today
Views Today
Advertisements
Advertisements