Solved

Proper Syntax for DSADD Command

Posted on 2010-08-12
6
1,681 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
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 from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

914 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

17 Experts available now in Live!

Get 1:1 Help Now