Solved

LDAP Query to find Groups in AD but Skipping an OU

Posted on 2013-12-12
4
278 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
  • 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction You may have a need to setup a group of users to allow local administrative access on workstations.  In a domain environment this can easily be achieved with Restricted Groups and Group Policies. This article will demonstrate how to…
Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
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…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

708 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

12 Experts available now in Live!

Get 1:1 Help Now