Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Create AD users with Powershell and CSV file.

Posted on 2011-02-16
5
Medium Priority
?
910 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

A hard and fast method for reducing Active Directory Administrators members.
It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
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 …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

618 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