Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
As an Exchange Admin, we probably receive requests to set forwarding on a mailbox. This could be for many reasons, but somewhere down the line, we get a request to provide all forwarders for a ___domain or for a mailbox.
To view the forwarders, we would need to launch the Exchange Management Shell (EMS) and run the following command:
- Get-Mailbox <mailbox> | fl ForwardingSMTPAddress,DeliverToMailboxandForward
https://collaborationpro.com/wp-content/uploads/2018/04/forwarding1.png
As you can see above, it shows no forwarding set for this user, we 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
https://collaborationpro.com/wp-content/uploads/2018/04/forwarding2.png
As shown above, we can see where forwarding has been enabled as the value is set to True.
We could 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