Hi,
I am looking for VB script to connect to a specific domain controller and launch Active Directory User and Computers. We are having several DCs spanned over distant location and the current replication setup would only happen every 2 Hrs due to various reasons.
Whenever we launch AD users and computers, it would normally be connected to the nearest available DC. I am trying find out a VB script to connect to a specific domain controller and launch AD users & computers with the chosen DC connected rather than the nearest DC.
On Error Resume NextDim objRootLDAP, objDomain, objShell
Set objDomain = GetObject _
("LDAP://dc1-test-01/OU=Domain Controllers,DC=test,DC=com")
Set objRootLDAP = GetObject("LDAP://rootDSE")
Set objShell = CreateObject("WScript.Shell")
objShell.Run "%systemroot%\system32\dsa.msc"
WScript.Quit
I could find this script but it will only give an AD console connected to my nearest DC and not to dc1-test-01. Hope the script is incomplete.
Any help on this would be thankful.