Many thanks but if it can be done via a few lines of Powershell code I would much rather do that.
Main Topics
Browse All TopicsIs it possible to update the details of users in an OU using what is in the csv file?
I have grabbed all the details and stored them in a csv file using:
$FilePath = "c:\descriptiontest.csv"
$OuDomain = "OU=Teachers and LSA``s,OU=Staff,OU=Alumwel
get-QADUser -searchRoot $OuDomain | export-Csv $FilePath
I have changed the "description" of some users and would like to update those into AD from the csv file.
I have used the following script to add to AD from Chris Dent, however it does not seem to work for attributes that already exist.
Code:
$OuDomain = "OU=Teachers and LSA``s,OU=Staff,OU=Alumwel
$Csv = "c:\descriptiontest.csv"
# Update details. Add/remove depending on which details to update.
import-csv $Csv | ForEach-Object {
Set-QADUser -ParentContainer $OuDomain -Name $_.name `
-SAMAccountName $_.sAMAccountName `
-Description $_.description -GivenName $_.givenName `
-SN $_.SN -DisplayName $_.displayName `
-UserPrincipalName $_.UserPrincipalName `
-ObjectAttributes @{ profilePath="$($_.ProfileP
Enable-QADUser $_.name
}
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Bulkuser AD has some quirks. When trying to import back from CSV or from the 'Edit from Excel' it errors out horribly. It exported the CSV file nicely, but when you need to return the data it got ugly... in my experience at least. I am eager to try out the solution listed here. Just want to verify that I am understanding the syntax changes, say I want to update the description, telephone, and office, the syntax for the lower half would read as follows;
Import-CSV $Csv | ForEach-Object {
Set-QADUser $_.DN -Description $_.description -Telephone $_.telephoneNumber -Office $_.physicalDeliveryOfficeN
}
Business Accounts
Answer for Membership
by: iampaulhPosted on 2009-11-04 at 03:36:59ID: 25738279
You could try using software/b ulkadusers /default.a spx
http://www.wisesoft.co.uk/
It's free and I use it to modify users in bulk