Yup, found it.
Yup, found it.
Doesn't work. Changing the CN causes CSVDE to create a new account.
One must 'move' an LDAP object to alter it's CN. Which explains the problems I was having.
wiseman, any chance of changing your script so it handles CN moves?
The script could probably be modified to handle the cn attribute - I might look at this when I get chance (I'm away for the weekend so don't know when I'll get round to it).
@Geoff: Why not use CSVDE to export your existing users to a CSV, edit the file and then perform the import after deleting the original users?
Because I'd have to reset their passwords.
It was an easy change to add support for the common-name(cn) attribute:
Hope this helps. :)
Someone asked about using the "mail" attribute to match their csv data with users in Active Directory. I decided to update the script to allow users to choose the attribute used to search (rather than hard-coded for sAMAccountName).
Simply change the strSearchAttribute to "mail" to get this to work. :cool:
Other users might want to use the userPrincipalName or other attributes to match rows in the csv file with users in AD.
I am trying to do exacly the same process. I need to add the student enrolment numbers to my students AD account.
I have tried to use CSVDE, but it doesn't allow you to overwrite existing accounts.
It will only import or export, it won't let you update.
If anyone has come up with a solution to bulk editing ad accounts, I would be most interested in it.
You can use DSMOD to change attributes. I had to to it a while back to fill in information for our exchange server. You create a spread sheet with all your users and then add the entries as follows. You can export your users using dsmod or csvde I can't remember which one. and insert them into the sheet
dsmod user "CN=testpupil,OU=Intake02,OU=student,OU=Accounts,D C=jschs,DC=local" -fn Joe -ln Bloggs -desc PUPIL -office SM -dept SM -company "Your school"
You then export it from excel to a text file and then change it to a bat file and run it on your domain controller. You can change any attribute you like.
I used this recently
AD Infinitum download from Networking category
30 day demo gave me enough time to make all the changes I needed to...
reads in from a CSV file and I added all students first name and surname
was a breeze...
Does ADModify work for these attributes?
In case the issue is still open to anybody, there is a solution called Softerra Adaxes (http://www.adaxes.com). Its functions set covers bulk update of Active Directory user info. Features - Business Units for objects in different domains & Basket for objects in the same domain. Thanks.