galdiano,

Pure Windows 2000, bonus !

ok - let's start by zeroing in on your users. I'm not sure how your domain is organized but give this script a shot. It lists all the users in the "User" container (along with some of the properties your were trying to get at earlier) ...

You'll have to adjust the ADsPath in the olegetobject() function to match your domain... let's just see if we can get this script to work first. Then we can modify to start renaming users ...

code:

break on


$ou = olegetobject(0,"LDAP://CN=Users,DC=TASSIEDEV,DC=COM")


$enum = oleenumobject($ou)
$object = oleenumobject($ou,$enum)


while $object


if olegetproperty($object,"class") = "user"


$name = olegetproperty($object,"name")
$firstname = olegetproperty($object,"firstname")
$lastname = olegetproperty($object,"lastname")


?"$name, $firstname, $lastname"


endif


$object = oleenumobject($ou,$enum)


loop


exit


-Shawn