Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords:
; Set credentials dsSetCredent("Me", "********") ; User account to be renamed. pUser = "LDAP://MyServer/CN=Homer Simpson,CN=Users,DC=myDomain,DC=windowware,DC=com" pTarget = "LDAP://MyServer/CN=Users,DC=myDomain,DC=windowware,DC=com" ; New account name cnNewName = "CN=Rabbit,Roger" ; Now move. pNewPath = dsMoveObj(pUser, pTarget, cnNewName) message("New Path", pNewPath) exitWWWBATCH.INI file indicates the last error 8329.
ERROR_DS_NO_PARENT_OBJECT The operation could not be performed because the object's parent is either uninstantiated or deleted.Not real sure how this would apply to the error 239, your seeing.
-----------
Commas are used to delimit an LDAP path, so you will need to somehow 'escape' the comma character.
Check out the RFC (Request for Comments) #1779 http://www.ietf.org/rfc/rfc1779.txt?number=1779
This documents contains the proper string representation of Distinguished Names.
It explains 2 different methods for quoting of a comma in an Organisation name:
CN=L. Eagle, O="Sue, Grabbit and Runn", C=GB CN=L. Eagle, O=Sue\, Grabbit and Runn, C=GBI would guess the same applies for the Common Name. This means you will need to include a special set of quotes around the CN name or use the \ character to escape the comma character.
Try modifying your script to the following:
Change the line from:
cnNewName = "CN=Rabbit,Roger"To:
cnNewName = 'CN="Rabbit,Roger"'Notice the use of single and double quotes.
This document basically explains that there are, different ways of dealing with special characters (like the comma) in ADSI path.
Special characters are:
"," "=" "+" "<" ">" "#" ";"If a character is one of the list shown above, then it should be escaped.
CN=L. Eagle,O=Sue\, Grabbit and Runn,C=GB
CN=L. Eagle,O="Sue, Grabbit and Runn",C=GB
Article ID: W15385
File Created: 2003:05:13:11:27:24
Last Updated: 2003:05:13:11:27:24