Monday, January 7, 2013

How to create several users in Active Directory (with script)

Here is something interesting.  Creating users in Active Directory is something that takes a lot of time and there are a lot of methods to do it in a more efficient way.  Of course, you may have heard about the templates, which is something no more useful than creating the users one by one.  I have tried it and I think it is not the best way to do it.  This afternoon I figured out a simple way to do this thing with a .bat file.  You can download it here.

The script is very simple to use.  It creates Users with the following characteristics:

  • Email consisting in the first letter of the First Name followed by the complete Last Name with @jorge.lab after that.
  • User Logon Name: the same than the email.
  • User Logon Name (Pre-Windows 2000):  First letter of the First Name followed by the complete Last Name.
  • Job Title: Junior QE.
  • Department: IT.
  • Company: QASoft.
  • Description: This is an example.
  • User must change password at next logon.
For example, John Smith:

So, what you have to do when you want to use the .bat file is this:

1. Open a CMD with administrative privileges and go to the folder where you saved the file you just downloaded.
2. Now, enter: command.bat John Smith jsmith 
Press Enter
This creates a user with the characteristics I mentioned before.

3. To create another user, e.g. Jane Williams, enter: command.bat Jane Williams jwilliams
To do this quickly you can press Up and replace "John Smith jsmith" with the name you want.  In this case, I'm using  "Jane Williams jwilliams" to create another user.  You can repeat this the times you need it.
To verify that the command worked, go to All Programs>Administrative Tools>Active Directory Users And Computers.  Expand jorge.lab>Users.  And there they are:

2 comments:

  1. Please have a look at this tool ASN Active Directory Manager.

    This tool provides more advanced options to create bulk users in Active Directory.

    ReplyDelete
  2. Pre-production is actually very crucial to be able to online video media production. Begin every video production by identifying, through extensive research, the company’s competitive advantage AND introduction in order to include Making use of your video clip production. professional-video-recording-services

    ReplyDelete