Finding all mails with redirection

Hello experts,
I use an exchange 2010 environment and I use the following command to list all mailboxes that redirects mails
Get-mailbox -ResultSize Unlimited | select PrimarySmtpAddress,ForwardingAddress | where {$_.ForwardingAddress -ne $Null} > $env:userprofile\Desktop\forward.csv

Open in new window

I have 2 problems however, the "ForwardingAddress" Parameter doesn't actualyl give me the email address it redirects to, and the CSV file doesn't break the two parameters into different columns Can you help me?
David SankovskySenior SysAdminAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Amit KumarCommented:
Please try below:

Get-mailbox -ResultSize Unlimited | where {$_.ForwardingAddress -ne $Null} | select PrimarySmtpAddress,ForwardingAddress,DeliverToMailboxAndForward | Export-Csv $env:userprofile\Desktop\forward.csv -nti

Open in new window

It will save results in 3 parameters, but for forwarding address you wil getl DN name not e-mail address as this is by design.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David SankovskySenior SysAdminAuthor Commented:
It's a shame I can't see the Addresses, Thanks anyway, you did help me with column thing :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.