WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Samples from Users

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Get User Information From Another Domain

 Keywords: ADSI Active Directory AD Get User Info Domain dsFindPath dsSetCredent LDAP

Question:

I am trying to get some user info from a Windows domain. The station I am running from is not on that domain, though. I'm not sure how to specify a different domain and pass credentials to it.

Answer:

Sample:
dsSetCredent("MYUSER",Password)
ServerPath="LDAP://SERVER.MYDOMAIN.COM/DC=MYDOMAIN,DC=com")
OneUser = dsFindPath( ServerPath,StrCat("(&(objectcategory=Person)(sAMAccountName=",EN,") )") )

Article ID:   W17547
Filename:   Get User Information From Another Domain.txt
File Created: 2009:08:18:09:02:14
Last Updated: 2009:08:18:09:02:14