Solved

Import CSV file into AD

Posted on 2013-11-11
4
784 Views
Last Modified: 2013-11-12
Hi Experts,

I need some help with the Enigma that is importing a csv file with AD attributes into Active Directory.

I have tried using csvde to import it but I get object not found error.

Can anyone help with maybe looking at the excel file I have and tell me what is wrong/what tool or command to use ?

Thank you
Daniel
0
Comment
Question by:gerard_thusa
  • 2
4 Comments
 
LVL 35

Expert Comment

by:Mahesh
ID: 39639284
0
 
LVL 53

Expert Comment

by:Will Szymkowski
ID: 39639874
You can use Powershell to accomplish this, if you have DC's that are using Server 2008.

Use the following basic command to import use Data from CSV file...

Make sure that you construct your CSV file like below if you are going to use this powershell script...

Name        DisplayName      SamAccountName   UserPrincipalName     Password
Joe Fresh  Joe Fresh              jfresh                         jfresh@domain.com    password!
etc...

Import-Module activedirectory
$Userlist = Import-Csv "c:\yourCSVfile.csv"
ForEach ($Person in $Userlist) {
$Person.Name
$Person.displayName
$Person.SamAccountName
$Person.userPrincipalName
$Person.Password
New-ADUser -Name $Person.Name -DisplayName $Person.displayName -SamAccountName $Person.SamAccountName -UserPrincipalName $Person.userPrincipalName -Enabled $true -AccountPassword (ConvertTo-SecureString $Person.Password -AsPlainText -force)
}

Open in new window


If you have other attributes you want to add let me know and i will construct the script accordingly...

Will
0
 

Author Comment

by:gerard_thusa
ID: 39640845
Hi Spec01,


Thanks for the above, however I am trying to simply update current users.

Please see attached csv file

Thank you
Daniel
0
 
LVL 35

Accepted Solution

by:
Mahesh earned 500 total points
ID: 39640865
Hi Daniel

In that case you can user WiseSoft Bulk AD users freeware tool.
It has very rich feature called "CSV Update" so that you can update\modify multiple users properties with CSV file.
Additionally It can run on any OS right from Windows 2003, powershell is not required for that.
You can download tool from below link.
http://wisesoft.co.uk/software/bulkadusers/default.aspx
0

Join & Write a Comment

My last post dealt with using group policy preferences to set file associations, a very handy usage for a GPP. Today I am going to share another cool GPP trick, this may be a specific scenario but I run into these situations frequently in my activit…
Synchronize a new Active Directory domain with an existing Office 365 tenant
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…

743 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

12 Experts available now in Live!

Get 1:1 Help Now