Overclock.net banner
1 - 9 of 9 Posts

·
Registered
Joined
·
494 Posts
Discussion Starter · #1 ·
I have a list of over 250 users in excel, just FName and LName. How do I import all these names into the correct OU's and input the correct information without manually adding each user individually?

I found a PowerShell script, it was out dated, I tried a couple command scripts, it didn't work, I found a utility (ADManager) it won't import my csv file ....
This is apparently really easy ... Can someone please help the noob ??
 

·
Oh Harro
Joined
·
674 Posts

·
Registered
Joined
·
2,179 Posts
Well if your spreadsheet only contains two columns, first name and last name, that will not be enough to directly import into AD User accounts. You will need at a minimum, a user account name (SAMAccountName) as well. In Powershell, the cmdlet you want to use would be New-ADUser, and what you could do is create a third column in your spreadsheet that contained the desired user account name, then import your csv into an array and basically do a for each command to create a new AD User.

Also note that if you do not specify a password for a new account when using the New-ADUser account, that the account will be disabled when created.

New-ADUser Cmdlet:
http://technet.microsoft.com/en-us/library/ee617253.aspx

Import-Csv Cmdlet:
http://technet.microsoft.com/en-us/library/ee176874.aspx

This should get you started on building a script that works for you. Sorry if you were looking for an all in one solutions. Here are a few additional links with alternative methods, but if you are interested in learning more about Powershell then the above information will prove helpful.

http://gallery.technet.microsoft.com/scriptcenter/Update-AD-Users-in-Bulk-ca0068f1
http://www.wisesoft.co.uk/software/passwordcontrol/csv_update.aspx

Good luck.
 
  • Rep+
Reactions: brewermoe

·
Registered
Joined
·
494 Posts
Discussion Starter · #4 ·
Thanks! I need to learn this instinctively and it is new to me so any instructional links are greatly appreciated as well.
thumb.gif


Is there a way to Create the SAMAccountName from a given list? (if I'm understanding this correctly its the "jdoe" of John Doe used for email and logon ...) ?
 

·
Registered
Joined
·
494 Posts
Discussion Starter · #5 ·
I get this error using the active directory user creation tool:

You are using an older version of the Options file. Please generate a new Options file and transfer your settings.
In use:
Latest: 1.2

... ? ( I'm barley green yet !! I'm just merely a seed!! lol)

Wouldn't I need to put my cvs file in that script somewhere?
... found instructions on another tab, didn't read far enough down
doh.gif
 

·
Registered
Joined
·
494 Posts
Discussion Starter · #6 ·
I am starting to get the hang of this tool. (Arposh New User Creation Tool) I am still unsure about a few things ...

OU:
it has two drop-downs ... OU= ... and CN= ... can someone elaborate on this please?

I can submit one person at a time, that works, is this how I get all 250 people in my active directory, 1 at a time? Can I not bulk add users that are in the same OU/Dept/ ... ?

Is there a way to get the user to input the missing info?
 

·
Registered
Joined
·
494 Posts
Discussion Starter · #7 ·
This is what I have come up with ...
I figured out how to create the template, opened it in Excel and copied my users into the template, then copied down the common info, ie domain name, company, default password etc ...,
(Back to Arposh) "Import CSV". Next I manually input the different items, such as Office, Title, and select the appropriate drop downs. Is this the correct way?
thinking.gif


This is much easier and faster than templates and single entries, but can I not bulk load these? Say make separate .csv templates for each OU and then have the user input the rest?

Perhaps a silly question (I couldn't find the answer) but the address info in the user properties of AD ... (which is used in the Arposh tool) is that for the users work location which links to say Exchange... or is it personal info ie where they live ...? What has access to that info?
 

·
Registered
Joined
·
128 Posts
If you have First and last Name in separate columns in excel.

For example I'll add users into an OU Users>Office and the domain is work.net and the users first names are in cells a2-a250, last names in b2-250

To create user names Enter (without quotes) '=CONCATENATE(CHAR(34),A2,B2,CHAR(34))' into cell c2

(This Creates a user name with surname first intial, eg Tom Smith will be SmithT)

Then across from that enter (with quotes)

"dsadd user "cn=C2,ou=Office,ou=Users,DC=Work,dc=net"

Then go tho the right corner and drag it down for as many users as you have, save this as a .csv open with notepad to make sure there is only one space is between the command (After dsadd & user, when happy with that save as a .cmd file and run on your DC server.

If you need to set passwords for these add -pwd whateveryouwant
 

·
Registered
Joined
·
494 Posts
Discussion Starter · #9 ·
Well fellas, I have this down to a science!

I use the ANUC.ps1 tool, which I modified to suit my needs, to create a template, then modify the .csv template to the OU's, user's and other common info then import using the tool. Very nifty tool once you get the hang of it. Then use the Get-User command in Exchange Management Shell and BAM! 1,300 users into my network with working mailboxes within 30 mins!!

Thanks tycoonbob and the rest of you for your assistance!
thumb.gif


oh, I found a random name generator to output some real fake names, cut and paste into the template .... (drag pull in Excel for asec number for name place holders)
 
1 - 9 of 9 Posts
Top