Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searching AD for SMTP User Alias' 1

Status
Not open for further replies.

Bedpan

MIS
Joined
Sep 24, 2003
Messages
89
Hopefully a stupid question.. But I cannot figure it out. Many of our users have email alias' created for there account. For example, sales@example.com, marketing@example.com as well as there primary user@example.com.

What I need is a way to search AD to find out who has these alias'. There are a number spread around and I no longer know who owns them. I would prefer to find a search function that allows me to find them rather then sending an email to them to know if they exist and who has them.

Thanks,

Mike
 
The following CSVDE query will return a CSV file with the Proxy Addresses for all of your accounts (this works in a Windows 2003/Exchange 2003 environment, but should work for Windows 2000/Exchange 2000 as well). Replace the items in brackets with your particular information:
Code:
csvde -f proxy.csv -s <servername> -d "cn=Users,dc=<yourdomain>,dc=<yourdomainextension>" -p subtree -r "(objectClass=person)" -l "proxyAddresses"
For example:
Code:
csvde -f proxy.csv -s domcontroller1 -d "cn=Users,dc=testdomain,dc=com" -p subtree -r "(objectClass=person)" -l "proxyAddresses"

Open the resulting file in Notepad or Excel and search for the addresses.
 
Crobin!

Many thanks.. will give this ago.. I am really surprised there is no way to do this using the AD search function.. I guess it is an Exchange Schema Extension that just has not accounted for.

Regardless. Many thanks!

Mike
 
Using the Advanced tab of the Find function in AD Users & Computers, you can search for Proxy Addresses. However, searching for items that can have multiple occurences (such as Proxy Addresses or Member Of) has never worked for me. While I haven't researched it, I assume it is a limitation of the Find function.

Also, when I'm looking for something like this I want to analyze it and so prefer it in CSV format anyway.
 
Crobin;

Thats what I found as well.. Searching on the Proxy address would not work.. Alas.. I will give the CSVDE a go.. I guess if nothing else it will get me motivated to start dumping some Data from AD for recording purposes.

Mike
 
Crobin;

I am new to exchange management and I saw this and would like to try it. Where would the code above be run from and should this file be saved as a .vbs?

Forgive me I am new to this you can only learn so much from a book.



Your Al Meyers Kid..You Look Pretty Stupid To me.
 
It is actually a command-line program, so you could save it as a .BAT or .CMD file. I usually run the command on my main domain controller so it doesn't have to talk to Active Directory across the network.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top