This is rather a rant than a question, but I'm trying to find a best practice.
A Active Directory I'm working with is currently organized using LastName, FirstName for displayName
. The distinguishedName
is CN=lastName\, FirstNameOU=Something,OU=Something,DC=domain,DC=local
When trying to use these names with SharePoint 2013 there is a very unwelcome behavior: double commas.
Any DispForm.aspx
will show Created on ... by LastName,, FirstName
When I change the Display Name on the current web to something without a comma:
$web = Get-SPWeb http://spweb
$user = $web.AllUsers | ? {$_.DisplayName -eq "Last, First"}
$user.DisplayName = "First Last"
$user.Update()
The name looks perfect:
When changing it back to something containing commas, I get the double comma:
This only occurs on DispForm.aspx
, Listviews display everything correctly:
Double Commas are Problem one. Problem two is the comma in the displayName
in General. MySites look very stupid with the comma in there. "About LastName, FirstName" looks very stupid - it should be "About Firstname LastName".
The admins like the LastName, FirstName scheme as everything is nicely organized alphabetically in AD, so I doubt they would like to change the displayName of all users. One can set the users' "Preferred Name", but that doesn't change all existing Webs and their respective users (I would have to iterate over all webs and change the Display Names).
What is your best practice to overcome this problem? Write a timer job which iterates over all webs and changes all Display names of all users to "FirstName LastName" every day? Write a PowerShell script which changes all "Preferred Names" to "FirstName LastName" instead of the comma approach?
Is there no way to tell SharePoint how to synch from AD with Synch rules or something like that?