Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What's the simplest way to export a list of all user accounts in a given AD OU, update their job titles, and then reimport them please?

share|improve this question
3  
Ahh.. "dsquery user -samid "User Name" | dsmod user -title "Network Monkey" –  Hutch Dec 15 '10 at 8:47
add comment

2 Answers

up vote 4 down vote accepted

If you've got access to the Quest Active Directory PowerShell cmdlets, you can use the following commands.

Get-QADUser | Select SamAccountName, Title | Export-Csv "JobTitles.csv" -NoTypeInformation

This will export all your users and job titles to a CSV file in the current directory. Modify as required and then issue the following command to bring them back in.

Import-Csv "JobTitles.csv" | ForEach{ Set-QADUser $_.SamAccountName -Title $_.Title }

share|improve this answer
    
Thanks Ben. I haven't right now but should be able to. Tbh the comment I added about (embarrassingly) 2 minutes after asking the question details what appears to be a simple and workable solution so that will probably be first choice as it's idiot proof, so is a good match for me :) –  Hutch Dec 15 '10 at 20:50
add comment

Perhaps something like WiseWoft Bulk Modify? http://www.activedir.org/Articles/tabid/54/articleType/ArticleView/articleId/66/Default.aspx

share|improve this answer
    
Interesting link thank you. Problem here is some of the titles have comma's in them, which makes CSV files awkward to use directly. –  Hutch Dec 15 '10 at 20:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.