Our domain name is: “COMPANYNAME”, we log in as “COMPANYNAME\username”.
If we do not sync user profiles from AD to SharePoint, everywhere on the site, people picker shows our usernames as “COMPANYNAME\username”

Our Forest name is Company.Corp.Net, our domain controller name Controller.Company.Corp.Net

Assuming everything works, after synchronizing with AD we should get users in SharePoint as such: (COMPANYNAME\username){Last, First}

But, after synchronizing with AD we get users with a wrong Domain Name, as such: (Company\username){Last, First}

This occurs when your NetBIOS name is different from your domain name and you must enable NetBIOS domain names on the corresponding User Profile service application. For more information about enabling NetBIOS names on a User Profile service application, see Get-SPServiceApplication.

The UPA property NetBIOSDomainNamesEnabled is used to control whether the CNC partition is included in the AD MA or not. By default it is false (not enabled) and the CNC and associated run steps are not included in the AD MA configuration. If it is enabled, then the CNC partition and run steps are included.

When editing a connection, the flag is ignored. If the CNC was included in the AD MA when it was created, then it will continue to be included in the AD MA. If the CNC was not included when the AD MA was created then it will never be included in the AD MA.   This is important as it means if you screwed up on the initial setup, you’re going to be effectively deleting all users which had their SAMAccountNames formatted incorrectly.

To “enable” NetBIOS domain names once a connection is created requires the connection to be deleted and a new connection created with the flag turned on (set to 1 or true). Remember, and it’s worth repeating: for users that were unintentionally imported with the flag turned off and later turn it on, this will delete all the users which had their SAMAccountNames incorrectly formated due to the NetBIOS domain name being incorrect, so keep your fingers crossed.

How To: Enable import of NetBIOS Domain Names

  1. Using the 2010 SharePoint Management Shell:
Get-SPServiceApplication

<lists the Service Applications and their GUIDs>

$UPA = Get-SPServiceApplication –Id <GUID of User Profile Service Application>

$UPA.NetBIOSDomainNamesEnabled=1

$UPA.Update()
  1. Delete the existing connection and “Create New Connection” on “Synchronization Connections” page.

  2. Perform a new “Start Profile Synchronization”

  3. Everyone’s SAMAccountName should now be using the correct netBIOS naming convention of COMPANYNAME\username.