Solved

Proper Syntax for DSADD Command

Posted on 2010-08-12
6
1,666 Views
Last Modified: 2012-05-10
Hi folks!

I am trying to add users to our Windows Server 2003-based Active Directory domain using the dsadd command. Unfortunately, even after looking through the documentation and knowledge base articles online, I am still apparently getting something wrong about the syntax.

Our domain name is a three-part name in the format "name1.name2.com". Here is the syntax I am using for the command:

dsadd user "CN=jdoe,CN=Users,DC=name1,DC=name2,DC=com" -fn "FirstName" -ln "LastName" -display "FullName" -pwd xxxxxx -memberof "CN=Students1" -hmdir \\server\home$\$username$ -hmdrv U: -profile \\server\profiles$\$username$ -mustchpwd yes -disabled no

When I execute that command, I receive the following error:

dsadd failed:CN=jdoe,CN=Users,DC=name1,DC=name2,DC=com:Directory object not found.

Can someone tell me where I'm messing this up?

Thanks!

- Ithizar
0
Comment
Question by:Ithizar
  • 3
  • 2
6 Comments
 
LVL 5

Accepted Solution

by:
TechnicallyMaybe earned 500 total points
ID: 33424516
It looks like it's with your -memberof switch as cn=students1 is not properly formatted.
0
 
LVL 5

Expert Comment

by:TechnicallyMaybe
ID: 33424524
Try the command without the -memberof to see if it works please.
0
 

Author Comment

by:Ithizar
ID: 33424592
No, even without the "memberof" argument, it still fails with the same error.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 5

Expert Comment

by:TechnicallyMaybe
ID: 33425450
Try  changing "CN=jdoe,CN=Users,DC=name1,DC=name2,DC=com" to:

 "CN=jdoe, OU=Users, DC=name1, DC=name2, DC=com"
0
 
LVL 38

Expert Comment

by:Adam Brown
ID: 33425480
Is the domain you're adding the user in a child of another domain? Like random.company.com?
0
 

Author Comment

by:Ithizar
ID: 33425795
Turns out it was a combination of a mistake in the name of the OU the user was going into -and- an error in the -memberof command. Thanks everyone!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction You may have a need to setup a group of users to allow local administrative access on workstations.  In a domain environment this can easily be achieved with Restricted Groups and Group Policies. This article will demonstrate how to…
Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
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…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now