Link to home
Start Free TrialLog in
Avatar of jwcchelpdesk
jwcchelpdesk

asked on

AD Email Distribution List problem

I created an email distribution group for one of our departments (ex: mydepartment).  The problem i have is the email address that it was assigned was "mydepartment2@mydomain.com". So, my question is how can i find out where there might be an account or an alias that is using "mydepartment@mydomain.com"? I need to find that out so i can delete that and then re-create the email distribution list so it doesn't have a "2" in the email address.

Thanks!
Avatar of DanielWillmott
DanielWillmott
Flag of United States of America image

Issue this in a command prompt to dump all the existing addresses into a file. Then look through the file to see if that address shows up:
dsquery * forestroot -scope subtree -filter "(&(mail=*)(proxyaddresses=smtp:*))" -attr proxyaddresses > smtps.txt

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of DanielWillmott
DanielWillmott
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jwcchelpdesk
jwcchelpdesk

ASKER

Dan,

it only gives me 100 results. How can i bypass that default limit to show everything?
i was able to find where i can modify the limit amount. I ran the command again, and found my entry.

Now how can i go about finding it, and deleting it?
Yes - I was going to mention the '-limit ###' parameter.
To delete the object, you can go to Active Directory Users and Computers, Actions/Find and put the name of the user/contact/group in the Name field. That should find the object allowing you to right click on it and perform tasks like delete.
It does not show up when i do a search. However when i did a custom Exchange Search in AD for mailboxes:

(&(&(&(& (mailnickname=*) (| (&(objectCategory=person)(objectClass=user)(!(homeMDB=*))(!(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=contact))(objectCategory=group)(objectCategory=publicFolder)(objectCategory=msExchDynamicDistributionList) )))))

it returned a list and my theory is that public folders have an email account tied to them and that is where my email address that i want to delete is from. I also checked some other public folders and they also have an email address that is tied to them which i found when i ran the commmand.
 
You could pull more info from the dsquery to figure out where it's coming from:
dsquery * forestroot -scope subtree -filter "(&(mail=*)(proxyaddresses=smtp:*))" -attr sAMAccountName distinguishedname objectCategory proxyaddresses >smtps.txt
 

Open in new window

Thanks for your help!!!

There's some other things i need to figure out, but at least i know where that email address is located