Is there a way, using PowerShell, to change the AD format of the usernames to Lastname, Firstname
?
I know how to do it manually like the answer given here. I am trying to see if I can add this to a script that I am putting together.
Thanks!
Edit
After digging a little deeper from this article here I was able to figure it out.
$domain = $env:USERDOMAIN
$uddn = "cn=user-display,cn=409,cn=displayspecifiers,cn=configuration,dc=$domain,dc=com"
$ud = [ADSI]"LDAP:// $uddn "
$ud.Put("createDialog","%<sn>, %<givenName>")
$ud.SetInfo()
createDialog
attribute using PowerShell?createDialog
attribute using PowerShell. What have you tried? Which part isn't working? Please add any code as an edit to your question.