Solved

LDAP Query to find Groups in AD but Skipping an OU

Posted on 2013-12-12
4
286 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 250 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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
Group policies can be applied selectively to specific devices with the help of groups. Utilising this, it is possible to phase-in group policies, over a period of time, by randomly adding non-members user or computers at a set interval, to a group f…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

688 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