Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: ADSI - Creating Computer Accounts
Can anyone let me know what the constraint violation might be?
AddExtender("WWADS34I.DLL") ;Sets user credentials username = askline("Active Directory - Create Workstation","Your Name:","") userpassword = askpassword("Active Directory - Create Workstation","Your password:") dsSetCredent(username, userpassword) sASDIPath = "LDAP:COMPLETE LDAP PATH GOES HERE" sObjectClass = "Computer" sComputerName = askline ("Active Directory - Create Workstation","Workstation name:","") sObjectPath = dsCreateObj(sASDIPath, sObjectClass, StrCat("CN=",sComputerName)) dsSetObj(sObjectPath) message ("Active Directory - Create Workstation","All done!") exit
dsSetProperty(sComputerPath, "samAccountName", StrUpper(StrCat(sComputerName, "$")))
Article ID: W15379
File Created: 2007:06:29:11:58:36
Last Updated: 2007:06:29:11:58:36