Here's what Ive got so far:
$theOU = read-host "enter OU name"
$txtBoxDisplayName = ($txtBoxSurname , $txtBoxGivenName)
$txtBoxDescription = read-host "Enter descr"
$txtBoxSurname = read-Host "enter surname"
$txtBoxGivenName = $txtBoxSurname + $txtBoxGivenName
$txtBoxTelephone = read-host "Enter phone #"
$txtBoxPassword = "P@$$WORD1"
$name = "$givenname $surname"
$proxyaddress = read-host "Enter the proxy address"
New-ADUser -path $myOU -DisplayName $txtBoxDisplayName -Description $txtBoxDescription -Surname $txtBoxSurname -givenname $txtboxgivenname -OfficePhone $txtBoxTelephone -AccountPassword (ConvertTo-SecureString $txtBoxPassword -AsPlainText -force) -enabled:$true
The given and display name variables are not working. I'm testing different syntax's.. both of which were wrong. I'd like to be prompted for the first and last names. Then have it auto form the display name of "last , first" then the CN of "last , first" and the SAMAccountName of "first letter+last name"
Eventually I'm going to try to get it to also set an smtp: proxy address, postal codes, City, State, title, extentionattribute1 and employeeID.
Right now though I cannot get the new-aduser -name to work correctly. I've tried quotes, (single and double), and parenthesis to no avail.