-->

Wednesday, January 15, 2014

Find Users Who Have Forwarding Set In Exchange 2010

At every place I've worked, when employees leave the company, their mail gets forwarded to their supervisors (generally for a set amount of time) so someone else can continue working on incomplete projects. The problem is; some admins forget to set a calendar reminder to end the forwarding and the messages start filling up the supervisor's mailbox.

Luckily, with PowerShell, you can easily export a CSV list of all users with forwarding set.
I prefer to have it in a CSV because it's generally easier to read than the PowerShell output, and if you have a ton of users in the list, PS will truncate it.

Fire up the Exchange Management Shell and run this command:

Get-Mailbox -resultsize Unlimited | Where {$_.ForwardingAddress -ne $null} | Select Name, ForwardingAddress, organizationalunit, whencreated, whenchanged, DeliverToMailboxAndForward | export-csv c:\Users_With_Forwarding.csv -NoTypeInformation

Now you should have a nicely formatted list (with Creation Date and to whom the messages get forwarded to) which you can use to verify if forwarding needs to be disabled!

No comments:

Post a Comment