Link to home
Start Free TrialLog in
Avatar of wyclef1
wyclef1

asked on

Finding DL's containing a specific domain

Hi

Our environment is Exchange 2007 SP3, but we have migrated our IT and other selected users to Exchange 2010 which we are rolling out. Our domain is exchange.com

We have several hundred Exchange distribution lists. Some of these contain external recipients (partner companies etc).

We have a partner company, domain.com, that we sometimes do business with. Some of their contacts are members of our DL's. Management have decided that they no longer want ANY domain.com addresses as members of our DL's.

Does anyone know a Powershell command I can run that will search ALL DL's and provide a list where this is any domain.com recipient in them?

And do we need to run this on an Exchange 2007 or Exchange 2010 machine, or does it not matter?
Avatar of Em Man
Em Man
Flag of Philippines image

hmmm...Let me know if this will work.

Go to AD

Customer Search > Advance Tab

Enter LDAP Query:
(proxyAddresses=smtp:*@domain.com)
sorry, I know you are looking for PS.
ASKER CERTIFIED SOLUTION
Avatar of Akhater
Akhater
Flag of Lebanon 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
Try this using power-shell.

Get-QADObject -ProxyAddress "*.exchange.com*" -searchroot "DC=Domainname, DC=COM" |select name, type

Make sure you have quest active roles for power shell is installed.

http://www.quest.com/powershell/activeroles-server.aspx

Good luck
Shaba
Go ADUC > Find > Select users and Contacts from options > Search query *@domain.com

Avatar of wyclef1
wyclef1

ASKER

Thanks All

Yes, we have Quest Powershell.

Is it possible to use Shaba's query to pull specific DL's that have @domain.com as members? I think the below will just give me a list of ALL objects with that address?

Get-QADObject -ProxyAddress "*.exchange.com*" -searchroot "DC=Domainname, DC=COM" |select name, type



did u try my script?
I am sorry did you try my script ? it will give you exactly what you asked for the list of all groups with any memeber @domain.com
Sorry, my mistake.
Instead of Get-qadobject, you can use get-qadgroup

Good luck
Shaba