Directory Services

Guy recommends :
Free Solarwinds
VM Console

Solarwinds VM Console Free Download

Find out which of your VMs are a waste of space and which VMs need more resources.


DSadd a New Way to Create Users in Windows 2003

Introduction to DSadd

DSadd is the most important member of this DS scripting family.  The primary use of DSadd is to quickly add user accounts to Windows Server 2003 Active Directory.  However, you can also use this method to create OUs computers, groups, or even contacts.

Creating an OU - DSadd ou....

Let us create an OU (organizational unit) to hold the rest of the test objects.  Edit the dc=cp and dc =com to the fully qualified name of your Windows 2003 domain.  As ever, pay close attention to the syntax, for instance the DN "ou=guyds, dc=cp, dc=com"  is enclosed in double speech marks.  Single 'speech marks' will not work.  Also remember that DS is new in Window 2003, so will not work in Windows 2000.

Example 1 Using DSadd to Create an Organizational Unit in Windows 2003

Preparation:

Logon to your domain controller.

Examine the script below.  Edit ou= or dc= to reflect YOUR domain.

Run, CMD then copy your script and paste into the command window.  Alternatively type it starting with dsadd ou .........


dsadd ou "ou=guyds, dc=cp, dc=com"
 

Note 1: dsadd ou.  This command tells Active Directory which object to create, in this case an OU (not a user).

Note 2: You only really need speech marks if there is a space in any of your names. So ou=guyds, dc=cp, dc=com would work fine, but ou=GUY Space DS, dc=cp, dc=com fails because of the spaces in the GUY Space DS, name.  In this second example you would type: "ou=GUY Space DS, dc=cp, dc=com"

°

Example 2 Employing DSadd to Create a User. (Assumes you have completed Example 1)

The purpose of this example is to create a new user in an OU called guyds.

Preparation:

Logon to your domain controller. 

Examine the script below.  Decide if cn= or ou= or dc= need editing.

Run, CMD then copy your script and paste into the command window.  Alternatively type it starting with dsadd user .........

Creating a User - DSadd user....


dsadd user "cn=guyt, ou=guyds, dc=cp, dc=com"
 

Note: DSadd requires the complete distinguished name.  Note also that the distinguished name is encased in double "speech marks".   I expect you spotted that the user will be created in the guyds organizational unit that was created in the first example.  Change "cn=guyt to a different user name if you wish.

Guy Recommends:  Solarwinds' Free Bulk Import ToolFree Download Bulk Import Tool

Import users from a spreadsheet.  Just provide a list of the users with their fields in the top row, and save as .csv file.  Then launch this FREE utility and match your fields with AD's attributes, click and import the users.  Optionally, you can provide the name of the OU where the new accounts will be born.

There are also two bonus tools in the free download, and all 3 have been approved by Microsoft:

  1. Bulk-import new users into Active Directory.
  2. Seek and zap unwanted user accounts.
  3. Find inactive computers.

Download your FREE bulk import tool.

DS Error Messages

DS has its own family of error messages.  I found that they are specific and varied, just remember to pay attention to detail.  READ ERROR MESSAGES SLOWLY.


See Also

 *


Custom Search

Guy Recommends: WMI Monitor and It's Free!Solarwinds WMI Monitor

Windows Management Instrumentation (WMI) is one of the hidden treasures of Microsoft operating systems.

Fortunately, Solarwinds have created the Free WMI Monitor so that you can actually see and understand these gems of performance information.  Take the guess work out of which WMI counters to use for applications like Microsoft Active Directory, SQL or Exchange Server.

Download your free copy of WMI Monitor

 

Home Copyright © 1999-2012 Computer Performance LTD All rights reserved

Please report a broken link, or an error.