Export-CsUserData
Topic Last Modified: 2013-02-22
Exports user data in a format that can be imported into Microsoft Exchange Server 2013. The data will be exported as a .ZIP file containing a pair of XML documents. This cmdlet was introduced in Lync Server 2013.
Export-CsUserData -PoolFqdn <Fqdn> <COMMON PARAMETERS>
Export-CsUserData -Identity <String> <COMMON PARAMETERS>
COMMON PARAMETERS: -FileName <String> [-ConfDirectoryFilter <String>] [-DomainController <Fqdn>] [-Force <SwitchParameter>] [-LegacyFormat <SwitchParameter>] [-UserFilter <String>]
The command shown in Example 1 exports user data from the pool atl-cs-001.litwareinc.com to a file named C:\Logs\ExportedUserData.zip.
Export-CsUserData -PoolFqdn "atl-cs-001.litwareinc.com" -FileName "C:\Logs\ExportedUserData.zip"
The Export-CsUserData cmdlet provides a way for administrators to export user data and/or conference directory for a Lync Server pool. That data, which can be saved in the user data format used by either Lync Server 2013 or Microsoft Lync Server 2010 can then be imported by using the Import-CsUserData cmdlet.
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 "Export-CsUserData"}
Lync Server Control Panel: The functions carried out by the Export-CsUserData cmdlet are not available in the Lync Server Control Panel.
| Parameter | Required | Type | Description |
|---|---|---|---|
| FileName | Required | System.String | Full path to the .ZIP file that the Export-CsUserData cmdlet will create; this file will contain the exported user data. For example: -FileName "C:\Logs\ExportedData.zip" |
| Identity | Required | System.String | Fully qualified domain name of the pool where the User database containing the user data to be exported is installed. For example: -Identity "atl-sql-001.litwareinc.com" Note that you can retrieve fully qualified domain names for your User database pools by running this command: Get-CsService –UserDatabase |
| PoolFqdn | Required | Microsoft.Rtc.Management.Deploy.Fqdn | Fully qualified domain name of the Registrar pool containing the user data to be exported. For example: -PoolFqdn "atl-cs-001.litwareinc.com" |
| ConfDirectoryFilter | Optional | System.String | When specified, allows you to import conference directory information for the specified conference directory. For example, to import data from the conference directory with the ID 13 use this syntax: -ConfDirectoryFilter 13 You can return conference directory IDs by using this command: Get-CsConferenceDirectory |
| DbName | Optional | System.String | Name of the offline database containing the user data to be exported. If you want to export data from an offline database this parameter is optional; however, the SqlInstanceName is mandatory when exporting from an offline database. The default database name is Xds. |
| DomainController | Optional | Microsoft.Rtc.Management.Deploy.Fqdn | Enables administrators to specify the FQDN of the domain controller to be used when running the Export-CsUserData cmdlet. If not specified, the cmdlet will use the first available domain controller. |
| Force | Optional | System.Management.Automation.SwitchParameter | Suppresses the display of any non-fatal error message that might occur when running the command. |
| LegacyFormat | Optional | System.Management.Automation.SwitchParameter | When specified, data is saved in the format used by Microsoft Lync Server 2010. |
| SqlInstanceName | Optional | System.String | Provides a way to export user data from an offline database. To export data from an offline database, you must include the SqlInstanceName parameter along with the name of the SQL Server instance where the data to be exported is stored. In addition to specifying the name of the SQL Server instance, you can optionally include the database name by adding on the DbName parameter as well. |
| UserFilter | Optional | System.String | Enables you to export data for a single user. That user is in dictated by specifying his or her SIP address, minus the sip: prefix. For example: -UserFilter "kenmyer@litwareinc.com" |
None. The Export-CsUserData cmdlet does not accept pipelined input.
The Export-CsUserData cmdlet creates new .ZIP files.
