Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Importing Mac addresses as users into Active Directory

Posted on 2012-12-27
3
Medium Priority
?
361 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
[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
3 Comments
 
LVL 71

Accepted Solution

by:
Qlemo earned 1200 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 800 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

Are You Ready for GDPR?

With the GDPR deadline set for May 25, 2018, many organizations are ill-prepared due to uncertainty about the criteria for compliance. According to a recent WatchGuard survey, a staggering 37% of respondents don't even know if their organization needs to comply with GDPR. Do you?

Question has a verified solution.

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

Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
This process allows computer passwords to be managed and secured without using LAPS. This is an improvement on an existing process, enhanced to store password encrypted, instead of clear-text files within SQL
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

721 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