Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Import CSV file into AD

Posted on 2013-11-11
4
Medium Priority
?
825 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 38

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 38

Accepted Solution

by:
Mahesh earned 2000 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

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
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 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…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Suggested Courses

877 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