Hi all!
How to connect to the AD from stand-alone computer? I've found the
connection string for OLE DB connection (Provider=ADSDSOObject;User
Id=myUsername;Password=myPassword;), however I cannot query the AD - an error
"A referral was returned from the server" is occured after I try to Execute
the command.
Here is my code:
-----
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=ADSDSOObject;User
Id=CN=Administrator,CN=Users,DC=cluster,DC=local;Password=Password;"
Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection
objCommand.CommandText =
"<LDAP://server.domain.tld/dc=domain,dc=tld>;(sAMAccountName=" & strLogin &
");distinguishedName;subtree"
Set objRecordSet = objCommand.Execute
-----
The same code works on member server.
Can anybody help?
--
R.V.