Yes, I would also think so. I would try to google on this particular error message and see what comes from it.
>I just downloaded the stuff Sergey recommended, but haven't went through it yet.
>
>Oddly enough, I get that error (below) no matter what I use (.Net, script, etc). I'm guessing it's an access issue (since it happens no matter what code I use).
>
>>>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