title: Creating ad user account with distinguished name
body: <p>For the life of me, I can't figure a way to either create a new ad account with the distinguished name as firstname lastname instead of the username or modifying it afterwards.  </p>
  
  <pre><code>New-ADUser -SamAccountName $UserName -Name $UserName -DisplayName $DisplayName -GivenName $FirstName -Surname $LastName -UserPrincipalName $MailAddress -AccountPassword (ConvertTo-SecureString $Password -AsPlainText -Force) `
  -Enabled $false -Path $OU -ChangePasswordAtLogon $true -server ad.corp.com -MobilePhone $MobileNumber -OfficePhone $OfficeNumber -Title $JobTitle
  $fullname = $FirstName + " " + $LastName
  $distinguishedName="CN=" + $fullname + ", " + $ou
  set-aduser $distinguishedName
  </code></pre>
  
  <p>The set-aduser returns a "directory not found" which makes sense since the distinguished name is the username.  </p>
  
  <p>Thanks</p>