Solved

Help combining two LDAP queries

Posted on 2009-04-13
2
1,644 Views
Last Modified: 2013-12-24
So I am trying to find all of the distribution groups that are in my AD environment that allow unauthenticated users to send to them.

In another question I was directed to the following LDAP query
(&(objectClass=group)(!msExchRequireAuthToSendTo=TRUE))
This query will return all distribution groups that dont require authentication.

This seems to work OK except it returns extra results. I am only interested in email enable distribution groups. I was able to come up with a query to find these.
(&(&(& (mailnickname=*) (| (objectCategory=group) ))))

What I would like to know is how can I combine these two queries so that they will only return mail enabled groups that dont require authentication?
0
Comment
Question by:Joseph Daly
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 57

Accepted Solution

by:
Mike Kline earned 500 total points
ID: 24132933
I don't have exchange in the lab at home (will install it soon) so I haven't fully tested
 I like adfind http://www.joeware.net/freetools/tools/adfind/index.htm
 
Try
adfind -default  -f "&(objectcategory=group)(legacyexchangedn=*)(!msExchRequireAuthToSendTo=TRUE)" name
Let me know if that works
Thanks
Mike
0
 
LVL 35

Author Comment

by:Joseph Daly
ID: 24137381
Well you know something I didnt use ADfind but your example did point me in the right direction.

I was able to test this using find, custom search in ADUC. Modified your syntax a little bit to below

(objectcategory=group)(!msExchRequireAuthToSendTo=TRUE)(mailnickname=*)

And it in fact does return a list of distribution groups where authentication is not turned on.

Thanks
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Always backup Domain, SYSVOL etc.using processes according to Microsoft Best Practices. This is meant as a disaster recovery process for small environments that did not implement backup processes and did not run a secondary domain controller that ne…
Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question