Awesome Powershell Script: List mailboxes that are forwarding mail

  2011-06-17


The following commands will list all mailboxes that are forwarding mail and where they are forwarding to. No more checking each mailbox individually to see where mail is routing!

$fwds = get-mailbox | Where-Object { $_.ForwardingAddress -ne $null } | select Name, ForwardingAddress

foreach ($fwd in $fwds) {$fwd | add-member -membertype noteproperty -name “ContactAddress” -value (get-contact $fwd.ForwardingAddress).WindowsEmailAddress}

$fwds
comments powered by Disqus