Solved

Importing Mac addresses as users into Active Directory

Posted on 2012-12-27
3
328 Views
Last Modified: 2013-01-16
I'm trying to use the import-CSV | New-ADUser setup to import a csv of about 2000 people into a group in AD. I'm trying to come up with what to name the headers of the csv for this to work to attain the following:

First Name
Last Name
display name
password
set the "Password Never Expires" attribute
set the "User cannot change Password" attribute
Enable the account for immediate use
0
Comment
Question by:Casey Weaver
3 Comments
 
LVL 68

Accepted Solution

by:
Qlemo earned 300 total points
ID: 38725403
How you name your CSV headers is up to you, and has absolutely no effect but as how the properties of the dynamic objects created from the CSV are named. For easier access I recommend not to use spaces and special characters.

BUT, if you name the CSV headers exactly as the parameters to New-ADUser (Name, GivenName, Display etc., see help of New-ADUser), you are able to just pipe the CSV into the cmdlet:
import-csv ThisIsMyFile.csv | New-ADUser

Open in new window

and that is probably what you are asking for. If you name the headers differently, you will need to process the CSV:
import-csv ThisIsMyFile.csv | % { New-ADUser -DisplayName $_.DisplayName -GivenName $_.LastName <# aso. #> }

Open in new window

0
 
LVL 40

Assisted Solution

by:Subsun
Subsun earned 200 total points
ID: 38726324
If you are using import-CSV test.csv | New-ADUser, then the AD accounts created will not be enabled by default, it's because New-ADUser requires a Secure String for the Password and the password from csv file will be plain text.

You may refer the following article for example..
http://blogs.technet.com/b/samdrey/archive/2011/09/26/bulk-populate-an-ad-using-a-csv-file-and-new-aduser-including-passwords.aspx
0
 
LVL 7

Author Closing Comment

by:Casey Weaver
ID: 38783487
The top solution was exactly what I needed. We also made renditions for our newer server in Powershell so we used that as well. Thanks guys!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Synchronize a new Active Directory domain with an existing Office 365 tenant
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

920 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

17 Experts available now in Live!

Get 1:1 Help Now