|
I
use this vbscript to first bind to rootdse in the domain I am
in.
Then use the results to build the global catalog string
for my ado search.
I
dont think it would be too difficult to convert to VB.
----------------------------------------------------------------------------------------------------
Set RootDse = GetObject( "LDAP://RootDse" ) Path = chr(60) & "GC://" & _ RootDse.get( "DefaultNamingContext" ) & _ chr(62) & chr(59) Set objConnection =
CreateObject("ADODB.Connection")
objConnection.Open "Provider=ADsDSOObject;" Set objCommand =
CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection objCommand.CommandText =
_
Path & "(&(objectCategory=person)(sn=*smi*));" & _ "mail,sn,DisplayName;subtree" Set objRecordSet =
objCommand.Execute
If objRecordset.EOF
Then
Wscript.Echo _ "No email accounts found with this last name." Else Wscript.Echo _ "Email account(s) with the specified last name" While Not objRecordset.EOF Wscript.Echo objRecordset.Fields("DisplayName") _ & vbtab _ & objRecordset.Fields("mail") objRecordset.MoveNext Wend End If objConnection.Close
----------------------------------------------------------------------------------------------------
Not sure if this
will help or not. But its the way I always ensure I hit a GC in the domain Im
in, no matter which domain Im in.
Clyde
Burns
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mulnick, Al Sent: Tuesday, December 16, 2003 3:53 PM To: [EMAIL PROTECTED] Subject: RE: [ActiveDir] finding GCs Gil's post should provide the information they need to do
this. Did you catch that one the other day? From: Creamer, Mark [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 2:46 PM To: [EMAIL PROTECTED] Subject: RE: [ActiveDir] finding GCs According to the developers, the app is trying to do 2 things:
So, they tell me they can specify the domain in their code. What they are looking for is how can they find a server that meets both needs (DC and GC) in that specific domain. The query would essentially say, "return a global catalog server in my.domain.com" (as opposed to a GC in domain.com or myother.domain.com)
They need to do this in VB
Thanks!
<mc> -----Original
Message-----
I think it's a compiled application that is called by the web app. But I'll know more tomorrow. We're supposed to meet to discuss it. I'll at least try to find out what they're doing a little more clearly
<mc> -----Original
Message-----
Mark, can you maybe post the code, as this will help us pinpoint the problem? If you have multiple domains, it probably depends more on which domain the universal group was created in than whether the DC is a GC or not.
Tony
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Mulnick,
Al IIRC You're looking for the isGlobalCatalogReady attribute. If set to true, then it's a global catalog. If not, then it's just a DC.
Al
From: Creamer,
Mark [mailto:[EMAIL PROTECTED] Our developers put together a web site on our intranet last year that allows privileged users to add members of their staff to various groups. It works great, except that now we are in native mode and are using some universal groups. The app will work properly as long as it happens to hit a DC that is also a GC. But from what they're telling me, it won't work for Universals if the app searches for a DC and finds one that does not happen to be a GC.
So what I'm looking for, is whether there is a LDAP query component that they can use in their app that will always only find DCs that are also GCs?
Thanks,
Mark Creamer Systems Engineer Cintas Corporation Honesty and Integrity in Everything We Do
This message is confidential, intended only for the named recipient(s) and may contain information that is privileged or exempt from disclosure under applicable law. Any patient health information must be delivered immediately to intended recipient(s). If you are not the intended recipient(s), you are notified that the dissemination, distribution or copying of this message is strictly prohibited. If you receive this message in error, or are not the named recipient(s), please notify the sender at either the e-mail address or telephone number above and discard this e-mail. Thank you. |
- [ActiveDir] finding GCs Creamer, Mark
- RE: [ActiveDir] finding GCs Mulnick, Al
- RE: [ActiveDir] finding GCs Tony Murray
- RE: [ActiveDir] finding GCs Gil Kirkpatrick
- RE: [ActiveDir] finding GCs Creamer, Mark
- RE: [ActiveDir] finding GCs Creamer, Mark
- RE: [ActiveDir] finding GCs Mulnick, Al
- RE: [ActiveDir] finding GCs Burns, Clyde
- RE: [ActiveDir] finding GCs Creamer, Mark
- RE: [ActiveDir] finding GCs Creamer, Mark
- RE: [ActiveDir] finding GCs Carlos Magalhaes
