WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Renaming a Group in Active Directory


Question:

Wondering if anyone has tried to rename a group in Active Directory with Winbatch. I exported all the Attributes from AD for a Group object and it looks like I need to rename. "SamAccountName", "Name" and "CN" but I get Unable to set property on the "CN" and "Name"

Any Ideas?

dsSetProperty(sUserPath, "SamAccountName", sValue)
dsSetProperty(sGroupPath, "cn", sValue)
dsSetProperty(sGroupPath, "Name", sValue)
ERROR: 1045:Operation is not allowed on RDN

Answer:

The "name" property is system only which means it is maintained by Active Directory.

If all you want to do is rename a group, use the "dsMoveObj" function.

For example,

sNewGroup = dsMoveObj(sGroup, sGroupContpath, "cn=New Name")
Check the extender help file for more details on the function's parameters.
Article ID:   W16323
File Created: 2005:02:18:12:19:48
Last Updated: 2005:02:18:12:19:48