actually what you want isn't all that hard to do... basically you want to creat a bunch of user accounts from data in a spreadsheet. Not all that bad if you verify the data before hand...

There are a Few UDFs that have what you need. It doesn't look too hard to scan these UDFs to find the fields you want to set...

ReadExcel2() - Reads from excel
UserCreate() - Creates a new user account
UsrMustChgPwd() - Force a user to change password at next login
ReadAccountStatus() - Reads the status of an user account
TranslateName() - converts a name from one type to another

and read this thread: Pulling info from AD http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Board=UBB1&Number=32595&fpart=&PHPSESSID=

here is the 'complex part' of your code.

ADSI (the Winnt:) stuff is easied to do some of the things you want to do, BUT does not have access to all the AD fields you need. THerefore, I see creating the account and the account related fields like password, lockout, groups, etc in ADSI... Then running it through TranslateName, to get the LDAP name and modifying/moving OU, email, office, etc.

With those UDFs from above, I see a 3 stage development.

step one, get the code to read all the required fields, validate all fields are populated in their variables, and there are no 'import' errors.

step one and a half, sort the fields you need into ldap and adsi, to plan what needs to be done where.

step two, make the script create basic user accounts (on your local machine should be safe, rather that dumping 'test' accounts on the domain... only using the ADSI provider.

step three, move up to LDAP, you will have to switch to the domain not your test machine, so try with a limited set of accounts (all obviously test names so you can clean up after), start with reading the values from ldap... it is easy to convert to writing them after testing


I think you can see why there are no 'canned' script to do what you need, too much is dependant on what any given network needs, AD/no AD, exchange 2000 mail servers or not, etc. but what you want to do certainly can be done.
_________________________
How to ask questions the smart way <-----------> Before you ask