Migrating Userdata from OCS 2007/R2/Lync 2010 to Lync 2013

Before Lync Server 2013 when you wanted to deal with user contact list manipulation you needed to use the dbimpexp.exe tool as part of the resource kit to export your user data and import it.  This tool had some limitations and wasn’t supported for migrations between environments where the SIP name remained the same.  In Lync Server 2013 all of this functionality is now built in with the Export-CsUserData, Import-CsUserData and Update-CsUserData.

Now with these commands comes lots of new flexibility when it comes to importing and exporting data.  Additionally, the Convert-CsUserData can be used specifically to update an OCS 2007/R2 and Lync 2010 dbimpexp file and convert it into a user .zip file that can be imported into Lync Server 2013.

So there is one item I want to draw your attention to as it appears to be a great distractor in terms of using this tool.  According to the TechNet article for the Import-CsUserData there is a -LegacyFormat switch that you would think would take a legacy formatted contact.xml and import it for you – well it won’t.  Not sure if it’s a bug or not written but it will result in an error stating that it cannot find the Convert-CsLegacyUserData cmdlet.  I’ll update if I hear why it’s looking for this command but it’s broken so don’t try it.

So what are the steps:

1. Convert your data from the legacy format to the Lync 2013 Format.  You can do that by using the following:

PS D:> Convert-CsUserData -InputFile .contactsv2.xml -OutputFile .contactsv2.zip -TargetVersion current

The TargetVersion of current means to convert it to Lync 2013.  One interesting item of note is that this command will search your Lync environment for users and verify that the SIP names exist.  So if you are using this as part of a migration you need to make sure all of the users exist in your new environment.

2. Import your data to Lync 2013

There are two commands that will get you there.  The Import-CsUserData and Update-CsUserData and although they both will get you to your final result they do very different things.  The Import-CsUserData imports your data into the back-end database which is great but its important to note that your front-end servers only reads this back-end database on cold-start.  So you would need to restart your front-end services to populate the database.  The Update-CsUserData on the other hand updates data for users who are currently logged into the system and doesn’t require a services restart.

I do want to throw a big thank you to Michael LaMontagne from Iluminari Tech for pointing me in the right direction for this task.


8 thoughts on “Migrating Userdata from OCS 2007/R2/Lync 2010 to Lync 2013

  • March 30, 2013 at 12:58 pm

    Thnx you for your post , but actually i did migration from lync 2010 to lync 2013 with no need to import contact list for users , contacts have the same contact list , i used command line to move from legacy to 2013 pool :

    move-csuser -identity “contact” -target New pool

    but when i try to move contact from lync control panel no user data is exist

  • Pingback:Migrating Userdata from OCS 2007/R2/Lync 2010 to Lync 2013

  • May 8, 2013 at 4:01 pm


    Thanks for your post. we have OCS2007R2 installed. I am planning to go for Lync 2010. I am just thinking that if i can remove OCS2007R2 completely and install Lync2010 from scratch because there are many things in our current environmental don’t work like group chat, meeting, SIP Trunking, Public IM connectivity, Public Video chat etc.

    Please let me know if i can do this or what will be the best way to handle this task.

  • May 10, 2013 at 11:11 am

    Hi Richard,

    We have OCS 2007 and are looking to move to Lync Server 2013. I know there’s no direct migration route from OCS 2007 R1, but then I stumbled across your post it got me wondering if there is an easy way to do this and preserve user contact lists. I wasn’t sure from reading your post whether Convert-CsUserData and Import-CsUserData are intended to be used in migration scenarios like mine? How would I move the OCS-enabled users across to the Lync 2013 server before importing the data?


    • May 11, 2013 at 12:34 am

      Garry – This wouldn’t be a supported upgrade path but it would essentially get you close to the same result. I would recommend testing the import/export process in your environment to make sure it works and you find no bad consequences.



  • May 30, 2013 at 12:57 pm

    Hi Richard,

    We are in a similar situation as GW999 and would like to try the export/import process. However, we were told that prior to installing Lync 2013 we would need to uninstall our OCS 2007 R1 environment, but if we do that, we would not be able to try this. Did we get bad information, and can OCS 2007 R1 coexist with Lync 2013?

    Thank you,


    • May 31, 2013 at 3:41 pm

      It’s not supported to have R1 and Lync 2013 in the same topology. So you will be going down a road of unsupportedness – but I called that out in the post as well.

      What you would do is not merge topologies from OCS 2007 to Lync 2013. So build your 2013 environment. Then you will need to do a flash cut in that scenario. Disable everyone in OCS, enable them again in Lync 2013 and then import in contacts. Again, absolutely not supported, but it works.

  • March 28, 2014 at 2:51 pm

    I installed Lync 2013 in the same domain as OCS2007. Now the FE service will not start (it keeps saying ‘starting,,,’.
    I did not migrate anything (and I don’t want to), they use different SQL servers and pools.

    On the OCS server I see this error:
    A significant number of connection failures have occurred with remote server is-lync-001.office.is.nl IP There have been 475 failures in the last 180 minutes. There have been a total of 4195 failures.
    The specific failure types and their counts are identified below.
    Instance count – Failure Type
    14 80072746
    4172 8007274C
    9 8007274D
    This can be due to credential issues , DNS , firewalls or proxies. The specific failure types above should identify the problem.



Leave a Reply

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