Help please!!!!
Guys,
Can anyone tell me how to modify the sAMAccountName of a group inn KIX? I am currently using the fnLDAPQuery(created by Chris S.) to pull info from AD and then the function below to rename the RDN of the group. This does not change the sAMAccountName though. I beleive this is because the MoveHere function can only change the RDN but I am not certain. Any help would be appreciated. The groupRename function is a mod of the userRename function created by Bryce(I think?).
Thanks,
Scripto
Code:
;Function to rename a group in AD!
Function groupRename($target, $oldgroup, $newgroup)
DIM $computer, $computerOBJ, $groupOBJ, $nul, $target
$TargetOBJ = getobject("LDAP://$target")
if vartype($TargetOBJ) <> 9 exit(@error) endif
$groupOBJ = getobject("LDAP://")
if vartype($groupOBJ) <> 9 exit(@error) endif
$nul = $TargetOBJ.MoveHere($groupOBJ.adspath,$newgroup)
exit(@error)
Endfunction