Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Active Directory (Add/Edit) using VFP 9
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01242228
Message ID:
01242607
Vues:
19
VFP needs brackets at this line.
objUser.Put("sAMAccountName", "SmithJohn")
>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've been tasked with populating a client's AD with records in a SQL table.
>>>
>>>I have found a ton of info about using .Net to do this, but I haven't been able to make it work.
>>>
>>>That said, I'm much more comfortable working in VFP and wanted to see if anyone else has done anything with adding/updating AD with VFP?
>>>
>>>Any info is appreciated....
>>>
>>>Thanks,
>>
>>Get http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=B4CB2678-DAFB-4E30-B2DA-B8814FE2DA5A and you'll find the scripts you need.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform