?
Solved

Create AD users with Powershell and CSV file.

Posted on 2011-02-16
5
Medium Priority
?
909 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
Richard2k4 earned 600 total points
ID: 34909410
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 400 total points
ID: 34909463
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
ID: 34910620
http://www.quest.com/powershell/

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

Expert Comment

by:KenMcF
ID: 34910747
0
 

Author Comment

by:Go-GBS
ID: 34916894
Thank you for the help.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Here's a look at newsworthy articles and community happenings during the last month.
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

752 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