Link to home
Start Free TrialLog in
Avatar of Gitcho
Gitcho

asked on

How to connect to a specific DC

I want to connect to a specific DC when I create my user accounts using VBscript on my ASP page ...

Here's my binding string :
      Set objOU = GetObject("LDAP://OU=User Accounts,DC=compnay,DC=com")
      Set objUser = objOU.Create("User", "cn=jsmith"))

The script works, but it creates the accounts on my local DC (server1.company.com), which takes awhile to replicate to the main DC.  How do I create users directly on the main DC (mainserver.company.com), so they show up right away in AD ?
Avatar of David Lee
David Lee
Flag of United States of America image

I'm not sure that'll help.  Right now you create an account on the local DC and have to wait for it to replicate to the main DC.  If instead you create an account on the main DC, then you'll have to wait for it to replicate to your local DC.  What's the difference?
Avatar of Gitcho
Gitcho

ASKER

We have multiple geographical locations ... replication takes longer between some DC's (sometimes many hours) than others ... so everyone is asked to work off one DC - so changes are seen immediately, and users can get up & running right away.
About adding "CN=ServerName"  to the existing PathName where <ServerName> is the actual name of the DC you want to connect to.

Set objOU = GetObject("LDAP://CN=ServerName,OU=User Accounts,DC=compnay,DC=com")
We too have many geographical locations but replication within our domain doesn't take hours.  If everyone is working off of one DC, and I'm not sure what you mean by that, then what's the point in having the other DCs?  How are the user's computers being forced to look at the one DC instead of going naturally to the nearest DC?
Avatar of Gitcho

ASKER

jkaios : didnt' work ...

blue : in AD, you right-click on the parent-node, and choose "Connect to Domain Controller" and choose it from the list ...

I guess it's not possible to specify.  Maybe i'll take it up with the server guys about the replication time.
Gitcho,

I know how to connect to a DC from ADUC.  But how does a user connect to a specific DC?  For example, a user wants to search AD for a printer.  How can they restrict the search to the server of their choice?  When they log in, how can they specify which server to log into?  I'm not understanding how creating a user on a specific DC helps changes to be ".. seen immediately, and users can get up & running right away".  And if there is a way to force this, then what's the point in having the other DCs?  If you really want everyone to work off of one DC, then eliminate the other DCs.

Please understand I'm not trying to be argumentative, I'm just not understanding the logic behind what it is you want to do.

-- BDF
Avatar of Gitcho

ASKER

It's OK blue ... no worries ... I'm confusing the terms here ...

Regular users won't ever have the choice of what DC they connect to ... It's done automatically when they turn on their PC (they don't even know what a DC is) ...

Helpdesk Staff (who are managing users accounts) do need to connect to a specific DC, so everyone is working from the same real-time information.

I've finally finished my form (in ASP, javascript & XML) that creates new users in AD.  When we have a list of 5 or more users to set up, we will ususally create one manually, then use that user to copy the settings.  If I create the first user, I don't want to have to wait (even 10 minutes) for that user to replicate through the DC's ...

If I can change the connection string, then I can create users on the main DC (the one we have all agreed to work off of), and no one has to wait to view their information.
ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gitcho

ASKER

for cryin out loud !   I thought I tried that ... works just fine now :)

Thanks a ton ...
Sure.  Sorry it took me so long to catch on to what you were looking for.