jsnetman Posted November 2, 2009 Posted November 2, 2009 (edited) 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,DC=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. Edited November 2, 2009 by jsnetman
kennysarmy Posted November 2, 2009 Posted November 2, 2009 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...
tmcd35 Posted July 13, 2010 Posted July 13, 2010 Try This: http://www.wisesoft.co.uk/software/bulkadusers/default.aspx IMHO this is the best answer I use wisesoft quiet a lot. I believe the author of the software was a member of these forums (don't know if he still is).
rgriffiths Posted June 14, 2013 Posted June 14, 2013 Bit of an old thread, but i'm doing this just now. I'm in the process of updating my AD fields, i use the addusers command line tool which only fills in the display name, not first/last name. I created a csv with student logon, name and surname in separate columns, then mailmerged it with the following: dn: CN=,OU=Year XX Students,OU=School Students,OU=School Users,OU=School Name,OU=Schools,DC=Education changetype: modify replace: givenName givenName: - replace: sn sn: - replace: mail mail: @domain.edu - replace: userPrincipalName userPrincipalName: @domain - changeType: modrdn newRdn: CN= ,OU=Year XX Students,OU=School Students,OU=School Users,OU=School Name,OU=Schools,DC=Education deleteOldRdn: 1 You need to make sure there's one blank line between each record, then use ldifde to import the file. Command line is ldifde -i -f filename.txt -s server You can also add -j for logging, -v for verbose and -k for ignoring the 'object does not exist' error. Bit longwinded but it seems to work. 1
Geoff Posted June 14, 2013 Author Posted June 14, 2013 (edited) CSV into powershell is probably the best way these days? To Create: Import-Csv c:\users.csv | ForEach { $Name = $_.givenName + " " + $_.sn New-ADUser -Name $Name ` -sAMAccountName $_.sAMAccountName ` -GivenName $_.givenName ` -Surname $_.sn ` -Initials $_.initials ` -DisplayName $_.displayName ` -Department $_.department ` -AccountPassword $_.ctPassword ` -Path $_.OU ` -ChangePasswordAtLogon $true ` -Enabled $true } To Update: Import-Csv c:\users.csv | ForEach ($User in $Userscsv) { Set-ADUser $User.sAMAccountName -Replace @{ title =$user.'job title'; company = $User.'business unit'; department = $User.'home department'; telephonenumber = $User.'work phone'; mobile = $User.'work wireless' } } Edited June 14, 2013 by Geoff 3
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now