Solved

Import CSV file into AD

Posted on 2013-11-11
4
796 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 36

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 36

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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
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 …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

828 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