exchange 2016 logo

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

Allen White

Allen is a Consultant for ITPS in the North East of England and holds the following accreditations. MCSA, MCSE, MCTS, MCITP, CCA, CCSP, VCP 4,5 and HP ASE, AIS - Network Infrastructure.

Leave a comment

Categories

Vote!

What Web Browser Do You Use?

View Results

Loading ... Loading ...

Vote!

What do you prefer..VMware or Hyper-V?

View Results

Loading ... Loading ...