Solved

Create AD users with Powershell and CSV file.

Posted on 2011-02-16
5
902 Views
Last Modified: 2012-05-11
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?
0
Comment
Question by:Go-GBS
  • 2
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
Richard2k4 earned 150 total points
Comment Utility
Look at the quest QAD controls.  Pretty sure there is a cmdlet that can do it.
0
 
LVL 27

Assisted Solution

by:KenMcF
KenMcF earned 100 total points
Comment Utility
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
 

Author Comment

by:Go-GBS
Comment Utility
http://www.quest.com/powershell/

Is this where you're referring to?
0
 
LVL 27

Expert Comment

by:KenMcF
Comment Utility
0
 

Author Comment

by:Go-GBS
Comment Utility
Thank you for the help.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now