Solved

Help combining two LDAP queries

Posted on 2009-04-13
2
1,592 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
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
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 tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

706 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now