Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 563
  • Last Modified:

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!
0
jwcchelpdesk
Asked:
jwcchelpdesk
  • 4
  • 4
1 Solution
 
DanielWillmottCommented:
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

0
 
DanielWillmottCommented:
Forgot to add the username to each record:

dsquery * forestroot -scope subtree -filter "(&(mail=*)(proxyaddresses=smtp:*))" -attr sAMAccountName proxyaddresses >smtps.txt

Open in new window

0
 
jwcchelpdeskAuthor Commented:
Dan,

it only gives me 100 results. How can i bypass that default limit to show everything?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
jwcchelpdeskAuthor Commented:
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?
0
 
DanielWillmottCommented:
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.
0
 
jwcchelpdeskAuthor Commented:
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.
 
0
 
DanielWillmottCommented:
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

0
 
jwcchelpdeskAuthor Commented:
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
0

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now