New Tool: Lync 2013 Contact Backup and Restore Tool (GUI)

I developed this tool simply because I realized when attempting a Lync 2013 contact restore that it’s difficult to tell which backup to use.  This is especially true when the user can’t quite remember when or how the contacts were removed.  I also realized that for some companies, not all of the staff is PowerShell savvy and enabling them to make easy backups and restores through a GUI would prove to be quite helpful.  What I’ve done is written a tool that allows for easy backups and restores of contact data, and also allows you to review the contents of your backup before you merge the data into your production system.  To run the tool, simply download the script from the TechNet Gallery and run it from a Lync server.  One item to note before we start, the PowerShell commands this tool uses do not work with the unified contact store (UCS).  What this means is you’re fine with this tool if you’re running Exchange 2010 or prior, or if you’re running Exchange 2013 but haven’t enabled the unified contact store to move your contacts out of Lync and exclusively into Exchange.

Run the script and right away you’ll see a form like below.  Click the Step 1 button to load up an existing backup file.  These backup files are created by running Export-CSUserData and should be included as part of a script that runs on your systems nightly.  If you don’t have one (you should), you can also create one by clicking one of the backup buttons at the bottom of the form.  Once you click the Step 1 button, a browse dialog will pop up allowing you to select your backup file.  The script will then load your users into the box above the button.

Step1

Once your contacts are loaded, you can then select a user by highlighting them.  If you know the data is good, you can proceed directly to Merge Selected User, which will be described later, or to review the contents of the backup file, you can click the Step 2 button.

Step2b

This button should load the contact information for the selected user only and display it for you to see.  Again, if the appropriate information is selected, you can skip right to the Merge Selected User button, or if you’d like to compare the information to the current contact information, you can click the Step 3 button as seen below.

Step3

You should now see both the current and backup contact information displayed side by side for comparison.  In the picture below, I found a deleted phone number and distribution group.  I can now simply click the Merge button and the contacts will be merged into your current Lync contacts.  Once the user has logged out and back into the Lync client, the restored contacts will reappear.

Step4

Finally, there are two buttons at the bottom that allow for easy user level and pool level backups.  Simply enter the sip address or the pool FQDN when prompted, and select a save location for your newly created file.

StepOther

To quit, please press the Quit button to allow the program to properly clean up after itself or you might see a temporary directory where the contents of your backups have been extracted.

To download the program, please find it here in the TechNet Gallery: http://gallery.technet.microsoft.com/Lync-2013-Backup-and-1f3167c8

If you like it please give it 5 stars over at the TechNet Gallery, if not, please drop me a line before you rate it and give me a chance at fixing whatever bug you may have found.   I might also be able to add a feature you’d like to see!

Thanks again and let me know what you think!

 

22 thoughts on “New Tool: Lync 2013 Contact Backup and Restore Tool (GUI)

  1. Pingback: New Tool: Lync 2013 Contact Backup and Restore Tool (GUI) | Anthony Caragol’s LyncFix Blog | JC's Blog-O-Gibberish

  2. JP Breton

    Cool Tool..

    Will it work against Lync 2010 ?

    Export Lync 2010 to Import in Lync 2013 ?

    1. C. Anthony Caragol Post author

      Nope, export-csuserdata is running behind the scenes, this command really only showed up with Lync 2013 as we used DBImpExp.exe in 2010. I know you know this, you’re an MVP, but you know, for others reading. : ) It wouldn’t be too rough I’d think since both commands work with XML and we’ve been provided the Convert-CSUserData command, I’d just have to ensure that the resource kit was installed, think it would be valuable? The hardest part would be combining it into the existing dialog in a way that made sense, or do you think a separate tool would be better?

  3. Brian Salzman

    Works great.. I’ve been tearing it apart to get rid of backups so I can just give this to junior admins for restores.. Way better then the powershell directions I had for them.

    1. C. Anthony Caragol Post author

      Thanks for the feedback! If there are any more PowerShell tasks your team has that would be more easily accomplished in a GUI or script, let me know. This is what I do for fun. : )

  4. Pingback: NeWay Technologies – Weekly Newsletter #104 – July 17, 2014 | NeWay

  5. Pingback: NeWay Technologies – Weekly Newsletter #104 – July 18, 2014 | NeWay

  6. Pingback: The UC Architects » Episode 41: The Missing Van Hybrid

  7. Daniel

    Hi!

    I would like to know if I can run a bkp from an user and restore the contacts in other one. So I can create a pattern list and deploy for all.

    Regards

  8. fksaifi

    Hi all,
    will this tool work on a client machine to backup and restore lync contacts for a lync 2013 client.
    or it works only on lync serves to take backup and restore.
    it should work on client machine coz users request this most rather then we need it on servers.

    1. C. Anthony Caragol Post author

      It only works on a server, or a client machine that would have the Lync management shell and administrative access due to the way Lync stores the information. A client-side backup application I’d imagine would be a separate C# app, but the user would need to initiate the backups which may be hard to get them to do.

  9. Edmund

    Hello Anthony, thanks for the wonderful tool. I would love to clarify on cross pool and cross forest contacts restoration, because I really see anything that specified the pool that contacts will be restored to. Is this tool for taking backups only? or for taking backup and restoring to the same pool? or backing up contacts and restoring to users who have been moved to another pool in another AD forest with a different SIP domain suffix in their SIP addresses? what is the backup and restoration story and limits please.

    Thanks.

  10. Heng

    Nice and useful tool.
    One question: is there any way to export the contacts in the Step 2: Review Backup Contacts?
    We need the contacts from the exported XML file for individual user. Thanks

  11. Pingback: Invoke-SFBContacts |

  12. Shaik

    Script is awesome, a small suggestion – It will be good if you include an option to delete all LYNC contacts

  13. Tejas

    Hi,
    I am getting below error while loading users.
    ———————————————————
    Cannot convert value “System.Object[]” to type “System.Xml.XmlDocument”. Error: “The input document has exceeded a
    limit set by MaxCharactersInDocument.”
    At C:\scripts\Lync2013_Contact_Restore_Tool.ps1:222 char:2
    + [xml]$LyncXMLFile = Get-Content “$BackupContentFolder\DocItemSet.xml”
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvalidCastToXmlDocument

    1. C. Anthony Caragol Post author

      Yeah, you may have exceeded the size limit for the XML simply. How many users are in your org?

  14. Korbyn

    Any chance that this works with export data from Lync 2013 and importing into Skype for Business 2015?

    1. C. Anthony Caragol Post author

      It should in as much as export-csuserdata and merge-csuserdata will. 🙂

Comments are closed.