?
Solved

LDAP Query to find Groups in AD but Skipping an OU

Posted on 2013-12-12
4
Medium Priority
?
287 Views
Last Modified: 2014-01-16
need to pull a list of all DL from AD but Skip a particular OU

need a LDAP command for it
0
Comment
Question by:ARM2009
[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
  • 2
4 Comments
 
LVL 57

Accepted Solution

by:
Mike Kline earned 750 total points
ID: 39714530
You could do something like this


get-adgroup -Filter 'GroupCategory -eq "Distribution"' -properties *| Where-Object {$_.DistinguishedName -notlike "*DN of OU*"} | format-list name, groupcategory, groupscope

Thanks

Mike
0
 

Author Comment

by:ARM2009
ID: 39714572
i need to filter via LDAP ... not a powershell.
0
 
LVL 57

Expert Comment

by:Mike Kline
ID: 39714580
ahhh ok...no way to do that via LDAP.  You can't filter an OU out in an LDAP query.  You can get the groups...I can help with that if you need that query.

Thanks

Mike
0
 

Author Comment

by:ARM2009
ID: 39714681
i already have the group query... was looking to skip a certain OU. thanks
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

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

This article demonstrates probably the easiest way to configure domain-wide tier isolation within Active Directory. If you do not know tier isolation read https://technet.microsoft.com/en-us/windows-server-docs/security/securing-privileged-access/s…
A hard and fast method for reducing Active Directory Administrators members.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
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 from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
Suggested Courses

762 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