>Hi Naomi,
>
>I'm using the following code to attempt to create a new user in AD on the local machine (domain name is hhccas):
>
>
>Set objOU = GetObject("LDAP://OU=management,dc=hhccas,dc=com")
>Set objUser = objOU.Create("User", "cn=SmithJohn")
>objUser.Put "sAMAccountName", "SmithJohn"
>objUser.SetInfo
>
>
>When I run the script, however, I get the following error:
>"A referral was returned from the server"
>
>To be clear, the server that I am running the code on is located in another city. I am using VPN to connect to the network and then using Remote Desktop to connect to the server (inside the network), then copying the script to that server and running it from that server.
>
>Have you encountered the error before? Is it something to do with this line?:
>
>Set objOU = GetObject("LDAP://OU=management,dc=hhccas,dc=com")
>
>
>Thanks!
>
I'm sorry, I haven't even worked with Active Directory much, so I would not know details.
Did you try the class Sergey pointed you to? I haven't checked it either.
If it's not broken, fix it until it is.
My Blog