Backing Up and Restoring Lync 2013 Contacts


Backing up Microsoft Lync 2013 is typically accomplished through the use of several PowerShell commands.  These commands can be combined into a single PowerShell script and run nightly as a scheduled task.  The individual commands are documented and can
be found within the TechNet library and are referenced below.  Pre-built backup scripts can also be found within the TechNet Gallery.  This article focuses specifically on the backup and restoration of user data.

User Backup Process

User data can be backed up through the use of the export-csuserdata command.  This command exports all user data for a pool into a pair of XML documents within a zipped archive.  In order to get a complete backup of all user data, this command will need to
be run at least once for each pool in your organization.  The command can be run as seen below to export all user data at once, or can be run with the –UserFilter parameter to backup only the user data for a single user.


Export-CsUserData -PoolFqdn “” -FileName “C:\Logs\”

Export-CsUserData -PoolFqdn “” -FileName “C:\Logs\” -UserFilter

User Restoration Process

There are two closely related PowerShell commands that can be used for the importing of user data, Import-CSUserData and Update-CSUserData.  Both have the ability to restore user data for a single user, or all users of a pool, but beyond that they have distinct


Import-CSUserData is used when you need to completely overwrite the user data with the copy from the backup.  It is important to note that after this command it run, the user will not see the effect of the change until the Front End service on all servers
within the pool has been restarted.


Import-CsUserData -PoolFqdn “” -FileName “C:\Logs\”

Import-CsUserData -PoolFqdn “” ” -FileName “C:\Logs\” -UserFilter


This command is used when the data from the backup needs to be merged with the existing data in the pool.  Unlike Import-CSUserData, this command does not require any service restarts to be effective, however it should be noted that due to the merging it
is more resource intensive which can result in delays when the operation is performed for many users at once.


Update-CsUserData -Filename “C:\Logs\”

Update-CsUserData -Filename “C:\Logs\” -UserFilter “”


This is a cross post for some content I made for the TechNet Wiki:

One thought on “Backing Up and Restoring Lync 2013 Contacts

  1. Pingback: Backing up/Restoring Lync/Skype for Business user contacts | Infoblog

Comments are closed.