New Add-SPProfileSyncConnection cmdlet seems to ignore NetBIOSDomainNamesEnabled property?

With the release of Service Pack 1 for SharePoint 2010 came a cmdlet called Add-SPProfileSyncConnection which finally allowed the OOB creation of a User Profile Sync connection with Powershell. Prior to this, one would either have to resort to manual creation of a User Profile Sync connection or write up some fairly eloquent custom Powershell to do the job.

As great as Add-SPProfileSyncConnection promised to be, there were some limitations discovered and not much documentation around it. Further, I think I may have found another issue with this new cmdlet – but it only applies in specific cases.

The User Profile service application has a property called NetBIOSDomainNamesEnabled, which is by default set to False. It can be set to True though if the host portion of your Active Directory domain name (e.g. corporate.local) doesn’t match the NetBIOS name of your domain (e.g. CORP). Otherwise, imported user profiles will incorrectly appear in the format corporate\brianl instead of the actual value CORP\brianl.

I’ve noticed that, on a User Profile service app with NetBIOSDomainNamesEnabled set to True, if a sync connection is created using Add-SPProfileSyncConnection and users are subsequently imported, the username format comes through incorrecty – as though NetBIOSDomainNamesEnabled was still set to False.

In the example below, you can see how, in my test domain lalancette.home, with NetBIOSDomainNamesEnabled set to True, my user profiles show up incorrectly as lalancette\username:

After_Add-SPProfileSyncConnection-Highlight

As this is unacceptable and just plain wrong, I decide to blow away the sync connection that was created by the cmdlet, and create one manually, old skool style – with identical parameters (as far as I can control). The connection gets created successfully (confession: I still get a little giddy when this happens), and I then proceed to Start Full Synchronization from Central Admin.

Monitoring user profiles within the service app page, I can actually see the number of profiles drop down to zero after that first full sync. No problem… I run it again, and presto… my user profiles return, and – most importantly – they display in the correct format!
After_ManualProfileSyncConnectionCreation

I’ve run this through several times, and can only attribute it to the connection having been created with the Add-SPProfileSyncConnection cmdlet.

Finally, I’ve confirmed this in all types of post-SP1 farms: SP1 alone, SP1 with the June 2011 CU, and even SP1 with the August 2011 CU.

Has anyone else run into this? Ping me on Twitter: @brianlala

Cheers

This entry was posted in Bugs, Hacks & Workarounds and tagged . Bookmark the permalink.

5 Responses to New Add-SPProfileSyncConnection cmdlet seems to ignore NetBIOSDomainNamesEnabled property?

  1. Marcus says:

    Hi Brian,

    It appears when you manually created the connection through the GUI, the problem didn’t occur? I’m running into an issue where the problem occurs either way, when running a Full or Incremental Sync on a new sync connection.

    Regards,
    Marcus

  2. Brian says:

    That’s correct, the usernames come in with the correct domain prefix when I create the connection through the GUI. Didn’t notice a difference though in running a Full vs. Incremental sync though, I imagine the results would be the same.

    Did you verify that your NetBIOSDomainNamesEnabled was set to True for your user profile service app?

  3. Gary says:

    As far as I know, this cmdlet is not supported for on premise installations, but is intended for Office 365 ?
    http://www.harbar.net/archive/2011/07/12/332.aspx

  4. I do not know whether it’s just me or if perhaps everyone else encountering issues with
    your site. It appears as though some of the text on
    your posts are running off the screen. Can somebody else please
    provide feedback and let me know if this is happening to them too?
    This might be a issue with my internet browser because I’ve had
    this happen previously. Cheers

Leave a Reply

Your email address will not be published. Required fields are marked *


7 × two =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>