Active Directory user creation -pwd is an unknown parameter

I'm trying to create a large number of users in Powershell on our Domain Controller and i am getting this error when trying to create just one: dsadd failed:'-pwd' is an unknown parameter

I have checked my dsadd line and it looks correct based on other internet searches but i cant get past this error. I know the password should be fine as it meets our complexity requirements. I will paste the line below for everyone to check out and see if they can pinpoint what is wrong. I changed the lines around to not have true data involved.

dsadd user cn=tuser,ou=TEST,dc=HostedAccounts,dc=TEST,dc=LOCAL -samid tuser -upn tuser@TEST.LOCAL -fn Test -ln User –pwd Testing123 -pwdneverexpires yes
MB_IT_SupportAsked:
Who is Participating?
 
Brian PierceConnect With a Mentor PhotographerCommented:
the - before pwd seems longer than the other dashes - is this the issue ?
if you've created the list is word its possible that the word autoformatting is to blame.
0
 
MB_IT_SupportAuthor Commented:
Yeah that is odd as in the editor it shows it as a Single character, however once i deleted and re-added it it shows as a single character and it works just fine.

Thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.