Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

DSADD Failed

Posted on 2014-09-04
8
Medium Priority
?
967 Views
Last Modified: 2014-09-04
I'm trying to make a few users using the DSADD command the following below is what my command is:

dsadd user "cn=TestUser01,ou=Trainer1 Users,ou=Trainer1,ou=Trainer,dc=TrainingDC,dc=com" -upn TestUser01@TrainingDC.com-display TestUser01 -pwd P@$$w0rd -mustchpwd yes-hmdir \\trainingdc\home\TestUser01 -hmdrv H:-profile \\trainingdc\profiles\TestUser01 -memberof "cn=TestUsers,ou=Trainer1 Users,ou=Trainer1,ou=Trainer,dc=TrainingDC,dc=com"

However when I hit enter I get the following error:

D:\>dsadd user "cn=TestUser01,ou=Trainer1 Users,ou=Trainer1,ou=Trainer,dc=TrainingDC,dc=com" -upn TestUser01@TrainingDC.com-display TestUser01 -pwd P@$$w0rd -mustchpwd yes-hmdir \\trainingdc\home\TestUser01 -hmdrv H:-profile \\trainingdc\profiles\TestUser01 -memberof "cn=TestUsers,ou=Trainer1 Users,ou=Trainer1,ou=Trainer,dc=TrainingDC,dc=com"
dsadd failed: 'TestUser01' is an unknown parameter
type dsadd /? for help

I'm learning about DSADD so it wouldn't surprise me if I'm missing something that I just overlooked.
0
Comment
Question by:jjmekkattil
  • 6
  • 2
8 Comments
 
LVL 13

Expert Comment

by:Gabriel Clifton
ID: 40304352
It might just be the way everything is displayed here or a copy paste error but you need a space here
-upn TestUser01@TrainingDC.com-display
to
-upn TestUser01@TrainingDC.com -display
0
 

Author Comment

by:jjmekkattil
ID: 40304355
I did notice that I was missing a space between @TrainingDC.com and -display so I went ahead and fixed that but now I am getting the following error:

dsadd failed:The parameter is incorrect
0
 
LVL 13

Expert Comment

by:Gabriel Clifton
ID: 40304382
I do not see a samid, not really needed because it can get it from cn. Here is a sample of a dsadd I use, maybe this will help.

dsadd user "cn=%First% %Last%,ou=%SCampus%,ou=student,DC=domain,DC=com" -samid %loginid% -pwd "%Pass%" -upn %loginid%@domain.com -fn "%First%" -ln "%Last%" -display "%First% %Last%" -memberof "cn=%StudentCN%,ou=Groups,DC=domain,DC=com" "CN=Students,OU=Groups,DC=domain,DC=com" -disabled no -canchpwd no -pwdneverexpires yes -desc "%StudentDesc%"
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
LVL 13

Expert Comment

by:Gabriel Clifton
ID: 40304389
space before -hmdir
still looking through your command
0
 
LVL 13

Expert Comment

by:Gabriel Clifton
ID: 40304393
and space between H:-profile
0
 
LVL 13

Accepted Solution

by:
Gabriel Clifton earned 2000 total points
ID: 40304403
dsadd user "cn=TestUser01,ou=Trainer1 Users,ou=Trainer1,ou=Trainer,dc=TrainingDC,dc=com" -upn TestUser01@TrainingDC.com -display TestUser01 -pwd P@$$w0rd -mustchpwd yes -hmdir \\trainingdc\home\TestUser01 -hmdrv H: -profile \\trainingdc\profiles\TestUser01 -memberof "cn=TestUsers,ou=Trainer1 Users,ou=Trainer1,ou=Trainer,dc=TrainingDC,dc=com"

Open in new window

0
 

Author Comment

by:jjmekkattil
ID: 40304436
Stupid spaces!!!  It worked thanks!
0
 
LVL 13

Expert Comment

by:Gabriel Clifton
ID: 40304444
No problem, sometimes it is the second pair of eyes that makes all of the difference.
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

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

What to do when Windows Update is not working correctly? What tools can I use to detect the cause of the malfunction problem? What does this numeric error code mean? These and other questions that you have been asking in the past are answered here (…
A procedure for exporting installed hotfix details of remote computers using powershell
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 …

824 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