





In addition, even after resetting the password, the user in ADLDS, by default, is still not enabled! So you still have to go about enabling the user account by updating the msDS-UserAccountDisabled attribute:
Finally, the userPrincipalName attribute is still not set by going through the wizard, so that also has to be set manually:
Fortunately, there is a much easier way to accomplish all of these manual steps in ADSI Edit by using PowerShell:
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true,Position=1)]
[string]$ADName,
[Parameter(Mandatory=$true)]
[string]$ADUPN,
[Parameter(Mandatory=$true)]
[string]$ADGivenName,
[Parameter(Mandatory=$true)]
[string]$ADSurname
)
#Example
#ADName John Doe
#GivenName John
#Surname Doe
#UPN jdoe@adlds.com
$ADLDSServer = "MYADLDSServer:5000";
$ADDefaultPwd = "P@ssword!";
$ADLDSPath = "CN=Roles,CN=AppPartition,DC=ADLDS,DC=COM";
Clear-Host
New-ADUser -Name $ADName -DisplayName $ADName -Server $ADLDSServer -UserPrincipalName $ADUPN -GivenName $ADGivenName -Surname $ADSurname -AccountPassword (ConvertTo-SecureString $ADDefaultPwd -AsPlainText -Force) -Enabled $true -PasswordNeverExpires $true -Path $ADLDSPath
Using PowerShell to create ADLDS Users is definitely much, much nicer and simpler!!