New-ADUser error during prompts

I read “Issue with New-ADUser” but that only mentioned about a period during login.
My issue is I keep getting error while creating users in powershell, it only works when I enter the username in the script. When I use the script that will prompt me to enter the first & last name I get an error. Please see screen shots.

1 Like

You need to put the -Name directly after New-ADUser and remove the `. Next, at the promt you didn’t enter a name looks like you just hit enter.