You can use dsquery group /?. A tool from Resource Kit W2K3.-


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ulf B. Simon-Weidner
Sent: Friday, April 30, 2004 6:58 PM
To: [EMAIL PROTECTED]
Subject: AW: [ActiveDir] help querying for groups

Hi Mark,
 
first thing which comes to my eyes is that the base it not started and ended with "<" and ">", but the whole query including base, filter and scope is.
 
So what I'd try is modifying the line beginning with strBase with
 
and the line starting with set objRS with
Set ObjRS = objConn.Execute("<" & strBase & strFilter & strScope & ">")
 
HTH, Ulf


Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Creamer, Mark
Gesendet: Freitag, 30. April 2004 22:31
An: [EMAIL PROTECTED]
Betreff: [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

 

AVISO LEGAL:
Esta informacion es privada y confidencial y esta dirigida unicamente a su destinatario. Si usted no es el destinatario original de este mensaje y por este medio pudo acceder a dicha informacion por favor elimine el mensaje. La distribucion o copia de este mensaje esta estrictamente prohibida. Esta comunicacion es solo para propositos de informacion y no debe ser considerada como propuesta, aceptacion ni como una declaracion de voluntad oficial de REPSOL YPF S.A. y/o subsidiarias y/o afiliadas. La transmision de e-mails no garantiza que el correo electronico sea seguro o libre de error. Por consiguiente, no manifestamos que esta informacion sea completa o precisa. Toda informacion esta sujeta a alterarse sin previo aviso.

This information is private and confidential and intended for the recipient only. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and shall not be regarded neither as a proposal, acceptance nor as a statement of will or official statement from REPSOL YPF S.A. and/or subsidiaries and/or affiliates. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.

Reply via email to