I recently came across this script http://www.freevbcode.com/ShowCode.Asp?ID=710
which returns user information from the AD. The problem I am getting is I am trying to access a certain OU.
I am new to LDAP with AD so I have no idea how to alter the code.
On the line
Set oDomain = GetObject("LDAP://" & sDomain)
I tried changing it to
Set oDomain = GetObject("LDAP://OU=MyUse
rs," & sDomain)
but it wouldnt work.
If i run the script without altering it, i can access all the users in the "Users" folder in AD. Whoever created the AD has placed the OU outside of the "users" folder....so if somedomain.com is the domain, the OU "MyUsers" and the "Users" folder will be subdirectories withthin that domain.
Can you assist me in to having this script run for the OU "MyUsers"?
I hope this is clear.