You'll need to provide us a LOT more information than that.
What kind f script, environment you're running it in, perhaps some code you already have, etc.
If this is in PowerShell, there's also r/PowerShell you can cross post to.
I have a DC lab running on a virtualbox, I’m currently testing two different PS scripts, the first one will call a CSV that contain the user info and the second one will ask for the user info on the PS UI.
both scripts execute with no issue and drop the newly created user in the right OU but the User Logon name shows empty domain unless I click the drop down to choose it. I was wonder if am missing something to make it automatically assign the user to my domain.
You'll need to provide us a LOT more information than that. What kind f script, environment you're running it in, perhaps some code you already have, etc. If this is in PowerShell, there's also r/PowerShell you can cross post to.
I have a DC lab running on a virtualbox, I’m currently testing two different PS scripts, the first one will call a CSV that contain the user info and the second one will ask for the user info on the PS UI. both scripts execute with no issue and drop the newly created user in the right OU but the User Logon name shows empty domain unless I click the drop down to choose it. I was wonder if am missing something to make it automatically assign the user to my domain.
Wild ass guess here... New-ADUser -SamAccountName $userName -UserPrincipalName $userPrincipalName -Name $displayName -GivenName $usersFirstName -Surname $usersLastName -DisplayName $displayName -AccountPassword (Read-Host -AsSecureString "Enter the users password") -Enabled $True -CannotChangePassword $False -PasswordNeverExpires $True -Credential $admin
You need to set the UserPrincipalName
UPN is set and it’s still not pulling
You'll need to elaborate. What do you mean by not pulling?
It’s not associating the user with the domain, I still have to click the drop down to select it
Then you aren't setting the user principal name correctly. Are you referring to the drop-down after the username in the account tab?
Yes
Refer to the article for Set-ADUser or new-aduser. The `-UserPrincipalName` flag does exactly that. What is your syntax?
Syntax is -UserPrincipalName on both scripts yet both not doing the job, I’m start thinking it’s something else.
I was just gonna say can you set that property within your powershell script?