Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

DSADD Failed

Posted on 2014-09-04
8
Medium Priority
?
882 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
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

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

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

My GPO's made for 2008 R2 servers were not allowing me to RDP into a new 2012 server by default.  That’s why I tried to allow RDP via Powershell, because I could log into a remote shell without further configuration. Below I will describe how I wen…
Every now and then, Microsoft does something that totally impresses me. It doesn't happen often, but in this case I must say I am thoroughly impressed with Windows Server Backup. One of the long time issues with Windows Backup has been the ability t…
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
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 …

730 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