Topic Last Modified: 2013-03-07

Enables administrators to import data exported from a Microsoft Lync Server 2010 Group Chat database into a Lync Server 2013 Persistent Chat database. This data must have previously been exported from the Group Chat database by using the Export-CsPersistentChatData cmdlet. This cmdlet was introduced in Lync Server 2013.


Import-CsPersistentChatData -FileName <String> <COMMON PARAMETERS>
Import-CsPersistentChatData -ByteInput <Byte[]> <COMMON PARAMETERS>
COMMON PARAMETERS: -DBInstance <String> [-Confirm [<SwitchParameter>]] [-Report <String>] [-WhatIf [<SwitchParameter>]]


Example 1

The command shown on Example 1 reads exported Persistent Chat data from the file C:\Logs\PersistentChatExport.xml and then adds that data to the Persistent Chat database\rtc (where "" is the fully qualified domain name of the SQL Server computer and "rtc" is the SQL Server database instance).

Copy Code
Import-CsPersistentChatData -DBInstance "\rtc" -FileName "C:\Logs\"

Detailed Description

The Persistent Chat service (which replaces the Group Chat service used in Microsoft Lync Server 2010) provides organizations with messaging and collaboration capabilities similar to those found in Internet discussion forums: users can exchange messages in real-time, yet can also revisit and restart those conversations at any time. Conversations can be based around specific topics, and these conversations can be made available to everyone or to only a selected set of users. Likewise, individual chat rooms can be configured so that anyone can post a message or configured so that only designated presenters can post messages.

If you are currently running Lync Server 2010, you can migrate your current Group Chat implementation by using the Export-CsPersistentChatData cmdlet to export your existing Group Chat configuration settings, then use the Import-CsPersistentChatData cmdlet to migrate that information to Lync Server 2013 and the Persistent Chat service. Note that the Export-CsPersistentChatData cmdlet gives you the option of importing all your Group Chat settings and data or only a portion of your Group Chat settings and data; for example, you can export (and then import) your Group Chat categories and chat rooms without exporting all the content associated with those categories and chat rooms.

Although primarily intended for migration purposes, the CsPersistentChatData cmdlets can also be used to manage Persistent Chat data on Lync Server 2013.

To return a list of all the role-based access control (RBAC) roles this cmdlet has been assigned to (including any custom RBAC roles you have created yourself), run the following command from the Windows PowerShell command-line interface prompt:

Get-CsAdminRole | Where-Object {$_.Cmdlets –match "Import-CsPersistentChatData"}

Lync Server Control Panel: The functions carried out by the Import-CsPersistentChatData cmdlet are not available in the Lync Server Control Panel.


Parameter Required Type Description




When specified, data is imported as a byte array rather than an XML file.




Fully qualified domain name and name of the SQL Server instance where the Lync Server 2013 Persistent Chat database is located. For example, this syntax specifies the database found in the RTC database instance on the server

-DBInstance "\rtc"




Full path to the XML file being imported. For example:

-FileName "C:\Logs\PersistentChatExport.xml"




Prompts you for confirmation before executing the command.




Enables you to specify a file path for the log file created when the cmdlet runs. For example:

-Report "C:\Logs\PersistentChatExport.html"

If this file already exists, it will be overwritten when you run the cmdlet.




Describes what would happen if you executed the command without actually executing the command.

Input Types

None. The Import-CsPersistentChatData cmdlet does not accept pipelined input.

Return Types