Solved

DSADD Failed

Posted on 2014-09-04
8
576 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 13

Expert Comment

by:Gabriel Clifton
Comment Utility
space before -hmdir
still looking through your command
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 13

Expert Comment

by:Gabriel Clifton
Comment Utility
and space between H:-profile
0
 
LVL 13

Accepted Solution

by:
Gabriel Clifton earned 500 total points
Comment Utility
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
Comment Utility
Stupid spaces!!!  It worked thanks!
0
 
LVL 13

Expert Comment

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

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

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…
The reason that corporations and businesses use Windows servers is because it supports custom modifications to adapt to the business and what it needs. Most individual users won’t need such powerful options. Here I’ll explain how you can enable Wind…
In this Micro Tutorial viewers will learn how to restore their server from Bare Metal Backup image created with Windows Server Backup feature. As an example Windows 2012R2 is used.
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 …

744 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

8 Experts available now in Live!

Get 1:1 Help Now