Exchange – Find All Forwards, Redirects and Attachment Forwards
In a larger Exchange environment without proper change control it can be quite difficult to keep track of where recipients emails are forwarded to, who they are redirected to or when specific attachments are forwarded to other users.
This can obviously be done in the ECP however it may take quite a long time to get all the information required, luckily the script below will list off all the redirects and forwards in an Exchange 2010, 2013 and Exchange 2016 environment, it also outputs the data to CSV to make the information easy to read.
foreach ($mbx in (Get-Mailbox -ResultSize unlimited)) { Get-InboxRule -Mailbox $mbx.DistinguishedName | where {($_.ForwardTo -ne $null) -or ($_.redirectto -ne $null) -or ($_.forwardasattachment -ne $null)} | select MailboxOwnerID,Name,ForwardTo | export-csv d:\exchangeforwards.csv} -Notypeinformation
Tags: forward, powershell, redirects