Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Active Directory Query

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,46584
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Active Directory Query
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Active Directory Query - 5/3/2007 12:02:13 AM   
  cjwallace

 

Posts: 493
Score: 0
Joined: 3/5/2005
From: United Kingdom
Status: offline
Hi Guys. i know this is not a AD site but i am building a AD query into a vbscript that i will need help with later.

What i am trying to do is use a query to return all Exchange Distribution Lists that begin with UK , EU , MN , GN

The code i have so far is


      

but what it is doing is returning all groups including security and DL.

Can anyone help me get the above to only display DL with UK , EU, MN , GN

Thanks very much in advance
 
 
Post #: 1
 
 RE: Active Directory Query - 5/3/2007 1:33:52 AM   
  LANlazy

 

Posts: 82
Score: 0
Joined: 4/11/2007
Status: offline
Do you want it in vbscript or LDAP like you are using now?

(in reply to cjwallace)
 
 
Post #: 2
 
 RE: Active Directory Query - 5/3/2007 1:35:15 AM   
  cjwallace

 

Posts: 493
Score: 0
Joined: 3/5/2005
From: United Kingdom
Status: offline
Hi mate.

In LDAP to start with.

Thanks very much

(in reply to LANlazy)
 
 
Post #: 3
 
 RE: Active Directory Query - 5/3/2007 2:08:31 AM   
  LANlazy

 

Posts: 82
Score: 0
Joined: 4/11/2007
Status: offline
Little simplified but should work

(&(&(|(&(objectCategory=person)(objectSid=*)(!samAccountType:1.2.840.113556.1.4.804:=3))(groupType:1.2.840.113556.1.4.804:=14)))(&(|(mailnickname=UK*)(mailnickname=EU*)(mailnickname=MN*)(mailnickname=GN*))(objectCategory=group) ))

(in reply to cjwallace)
 
 
Post #: 4
 
 RE: Active Directory Query - 5/3/2007 2:40:13 AM   
  cjwallace

 

Posts: 493
Score: 0
Joined: 3/5/2005
From: United Kingdom
Status: offline
Excellent , thanks very much :-)

(in reply to LANlazy)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Active Directory Query Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts