Hey Mark,
I am not an ADO fan but it appears you are missing the
attributes you want returned in your execute...
BTW, this will get you ALL groups named RPT* in the domain,
it won't just get Global Groups. If you want global groups only, you need to add
something to your filter...
All Global Groups:
(groupType=grouptype:1.2.840.113556.1.4.803:=2)
All Global DLs: (groupType=2)
All Global Security groups:
(groupType=-2147483646)
Of course you could always do something
like:
adfind -bit -b <domain DN> -f
"&(objectcategory=group)(groupType=grouptype:AND:=2)(name=RPT*)"
or if you just want DNs you could do
adfind -bit -b <domain DN> -f
"&(objectcategory=group)(groupType=grouptype:AND:=2)(name=RPT*)"
-dn
joe
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Creamer, Mark Sent: Friday, April 30, 2004 4:31 PM To: [EMAIL PROTECTED] Subject: [ActiveDir] help querying for groups Hi, can someone help me troubleshoot this script? I’m trying to return all of the global groups in the domain whose name starts with RPT. All I’m getting is the error: “Provider: Unspecified error”
strBase = "<LDAP://dc=my,dc=domain,dc=com>;" strFilter = "(&(objectCategory=group)(name=RPT*));" strScope = "Subtree"
Set objConn = CreateObject("ADODB.Connection") objConn.Open "Provider=ADsDSOObject" Set ObjRS = objConn.Execute(strBase & strFilter & strScope) objRS.MoveFirst While Not ObjRS.EOF WScript.Echo objRS.Fields(0).Value objRS.MoveNext Wend
I’m trying to do this by altering one of the recipes in Robbie Allen’s book. Thanks!
Mark Creamer Systems Engineer Cintas Corporation Honesty and Integrity in Everything We Do
|
- [ActiveDir] help querying for groups Creamer, Mark
- RE: [ActiveDir] help querying for groups rpuckett
- AW: [ActiveDir] help querying for groups Ulf B. Simon-Weidner
- RE: [ActiveDir] help querying for groups joe
- RE: [ActiveDir] help querying for groups Mikael Svennungsson
- RE: [ActiveDir] help querying for groups Mikael Svennungsson
- RE: [ActiveDir] help querying for groups Creamer, Mark
- RE: [ActiveDir] help querying for groups JCARROS