Listing all AD accounts with exchange forwarding configured on them

Is it possible to list all AD accounts with exchange mail forwarding configured on them?

I need to provide a report of exchange accounts with email forwarding to any other exchange account

The server is a windows server 2003 standard edition.

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.

Chris DentPowerShell DeveloperCommented:

Yes, it is.

Do you favour any particular tool?


dsquery * -Filter "(altRecipient=*)"


AdFind.exe -default -f "(altrecipient=*)"


Get-QADUser -LdapFilter "(altRecipient=*)"

etc, etc

Do a custom search in ad:

applicableAuthor Commented:
I'd prefer to use DS query,

I do not use commands often so if you could provide me with the full command to use that would be very helpful, thanks
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

Chris DentPowerShell DeveloperCommented:

What would you like to see from the user? DsQuery is a bit limited, but this is a reasonable start:

DsQuery * -Filter "(&(objectClass=user)(objectCategory=person)(altRecipient=*))" | DsGet user

DsGet user will not be able to show you who the altRecipient is. If you need that I suggest you go with ADFind or PowerShell, both of which can return anything you might want, and both can easily export to CSV files (for Excel).


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
All of them above have supplied the full commands.

dsquery * -Filter "(altRecipient=*)"

from a command-line will work
So give the points to Chris-Dent for the DSQUERY command not me...
applicableAuthor Commented:
Very quick response, thanks
applicableAuthor Commented:
Thanks for all your comments, very helpful
Chris DentPowerShell DeveloperCommented:

You're welcome :)

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
Email Servers

From novice to tech pro — start learning today.