Create AD users with Powershell and CSV file.

Would someone be able to help me create a script that could read from a CSV file to create AD users?  If someone could at least give me a basic idea of the snytax I would appreciate it.  Also, does it make any difference that this is a Server 2003 domain?
Go-GBSAsked:
Who is Participating?
 
Richard2k4Connect With a Mentor Commented:
Look at the quest QAD controls.  Pretty sure there is a cmdlet that can do it.
0
 
KenMcFConnect With a Mentor Commented:
I agree the quest tools will be the easiest. What does your CSV file hearder look like?
This is not tested..
Here is an example

Firstname,Lastaname,samccountname
Test,User,tuser

$users = import-csv c:\users.csv
$Users | %{
new-qaduser  -name $_.name -samaccountname $_.samaccountname -FirstName $_.firstName -LastName $_.LastName -parentcontainer "OU=UserAccount,DC=Domain,DC=Local" -userpassword "P@ssw0rd"
}
0
 
Go-GBSAuthor Commented:
http://www.quest.com/powershell/

Is this where you're referring to?
0
 
KenMcFCommented:
0
 
Go-GBSAuthor Commented:
Thank you for the help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.