Wednesday, March 19, 2014

Export Lync User Configuration (former DBIMPEXP)

You for your information, with Lync 2013 some former tools are depreciated.

While in LCS, OCS and Lync 2010 exporting the user data was done with the dbimpexp.exe utility.

Now with Lync 2013 new EXPORT-CSxxx commands are integrated within the Lync Management Shell.

Convert-CsUserData
Import-CsUserData
Sync-CsUserData
Update-CsUserData

As we now from former days, we had to use DBIMPEXP to extract the user data, e.g. the Lync buddy list, to export data directly out of the RTC database.

Lync 2013 made the export functions more convenient and added PowerShell commands to do a more simplified export. With this EXPORT-CSxxx commands, you can export:
  • User Data
  • Conference Directories
  • LIS (Location Information Service) - E911 Data
  • RGS - Response Group Data
  • Persistent Chat Data

With the Convert-CsUserData command, you are able to convert former XML formats into the actual Lync 2013 format. But if you need to convert Lync 2013 data backward to Lync 2010, you need to do this during the Export-CsUserData command with the option parameter: -LegacyFormat

Other helpful parameter are:
-UserFilter: filter for dedicated user or bulk users
-ConfDirectoryFilter : Filter for Conference Directories, with you should first identity with Get-CsConferenceDirectory and than use the number display as the identifier.

NOTE/ WARNING:
The Export-CsUserData command also exports Lync Application User.
If you for example had a deployment, where you changed the default SIP domain and deleted this default SIP domain (Which by the way is UNSUPPORTED), you will have to clean up the XML file or you make sure, that only Lync Users are exported, which you need for this.

Best Practice:
You run a command and export the User names:
Get-CsUser | fl *sip* > C:\CsUser.txt
and
Export-CsUserData -PoolFqdn "frontend.pool.fqdn" -FileName C:\UserDataExport.zip
Than if you import, do so selective, that means write a script, which will use the CsUser.txt to import only the user you need and make sure you excluded the Lync Application users.
Make sure the txt file has the SIP identifier in first row.
SIP
usera@sip.com
userb@sip.com

Import-csv C:\scripts\CsUser.txt | ForEach-Object {Import-CsUserData -PoolFqdn "frontend.pool.fqdn" -FileName C:\UserDataExport.zip -UserFilter $_.SIP}

No comments:

Post a Comment