Recently we were dealing with an issue where users were imported from Active Directory into SharePoint User Profiles using the first part of the Fully Qualified Domain Name instead of the NetBIOS Domain Name. This creates issues with the User Profiles, specifically with the Organizational Browser. It appears there is a simple fix by setting the “NetBiosDomainNamesEnabled” property of the User Profile Service Application (UPA) to “True”. You can find several examples of how to do this on the web, but simply put:
After this is completed, you must create a new synchronization connection. Be aware, in our experience, deleting an existing connection will purge your existing profiles. That works great if done before any profiles have been updated. Our issue was what to do to apply this same fix but preserve existing profiles and their information. The fix? A combination of enabling NetBiosDomainNames on the UPA and resetting Profile Synchronization using PowerShell. First, the situation: We have a profile store with over 2000 profiles in it. Approximately 800 of which have been updated by end users. Due to a previous issue with the UPA, this is the second incarnation of the UPA at this client. Unfortunately after this one was created the synchronization connection was created before the NetBiosDomainNamesEnabled property was flipped. Now we had new profiles coming into the UPA with the first part of the FQDN instead of the NetBIOS name.
You can find the link to TechNet on how to “Reset Profile Synchronization by using Windows PowerShell” here. This is part of bigger article on maintaining the SharePoint 2010 Profile Synchronization.
Here is the TechNet article verbatim:
Here are some addendums to this for our use:
In Step #9, we modified the script to find the User Profile Service Application
$syncdb = Get-SPDatabase | where {$_.name -eq "User_Profile_Service_Application_Sync_DB"}
$syncdb.Unprovision() $syncdb.Status=‘Offline’
$upa = Get-SPServiceApplication | where {$_.name -eq "User Profile Service Application"}
$upa.ResetSynchronizationMachine()
$upa.ResetSynchronizationDatabase()
$syncdb.Provision()
Replace with the name of your sync DB and your UPA.
This script does not show any status or progress, so you may adjust your script to show you it is working.
We did not find step #14 necessary.
Step #17 is not necessary if your UPA is on a different server than your Central Admin.
Now make sure you flip the property on the UPA:
Copy the following code and paste it into a text editor, such as Notepad:
$upa = Get-SPServiceApplication | where {$_.name -eq "User Profile Service Application"}
$upa.NetBiosDomainNamesEnabled = "True"
$upa.Update()
Replace with the name of your UPA.
Save the file as ANSI-encoded text file and name the file EnableNetBiosDomainNames.ps1
At the Windows PowerShell, type the following command:
.\EnableNetBiosDomainNames.ps1
Notice there are now no Synchronization Connections: