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

 

Reply via email to