Edit

Share via


Export-CsUserData

Exports user data in a format that can be imported into Skype for Business Server 2015. The data will be exported as a .ZIP file containing a pair of XML documents. This cmdlet was introduced in Lync Server 2013.

Syntax

Identity

Export-CsUserData
    -FileName <String>
    -Identity <String>
    [-ConfDirectoryFilter <String>]
    [-DomainController <Fqdn>]
    [-Force]
    [-LegacyFormat]
    [-UserFilter <String>]
    [-UserFileFilter <String>]
    [<CommonParameters>]

PoolFqdn

Export-CsUserData
    -FileName <String>
    -PoolFqdn <Fqdn>
    [-ConfDirectoryFilter <String>]
    [-DomainController <Fqdn>]
    [-Force]
    [-LegacyFormat]
    [-UserFilter <String>]
    [-UserFileFilter <String>]
    [<CommonParameters>]

SqlInstance

Export-CsUserData
    -FileName <String>
    -SqlInstanceName <String>
    [-ConfDirectoryFilter <String>]
    [-DbName <String>]
    [-DomainController <Fqdn>]
    [-Force]
    [-LegacyFormat]
    [-UserFileFilter <String>]
    [-UserFilter <String>]
    [<CommonParameters>]

Description

The Export-CsUserData cmdlet provides a way for administrators to export user data and/or conference directory for a Skype for Business Server pool. That data, which can be saved in the user data format used by Skype for Business Server 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 prompt:

Get-CsAdminRole | Where-Object {$_.Cmdlets -match "Export-CsUserData"}

The functions carried out by the Export-CsUserData cmdlet are not available in the Skype for Business Server Control Panel.

NOTE: URNs that have the following characters back slash (\) and forward slash (/) will cause the powershell command to fail and stop the export of the user data until that point.The following error is reported: Export-CsUserData : "urn:hcd:User1/test@domain.com" is not a valid uniform resource name (At line:1 char:1+ Export-CsUserData -PoolFqdn pool01.domain.com -FileName c:\temp\UserDataExport.zip+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Export-CsUserData], UriFormatException + FullyQualifiedErrorId : System.UriFormatException,Microsoft.Rtc.Management.BlobStor

Examples

Example 1

Export-CsUserData -PoolFqdn "atl-cs-001.litwareinc.com" -FileName "C:\Logs\ExportedUserData.zip"

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.

Parameters

-ConfDirectoryFilter

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

When specified, allows you to export conference directory information for the specified conference directory. For example, to export 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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DbName

Applicable: Skype for Business Server 2015, Skype for Business Server 2019

Name of the SQL Server database containing the user data to be exported.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SqlInstance
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DomainController

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

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.

Parameter properties

Type:Fqdn
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FileName

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

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"

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Suppresses the display of any non-fatal error message that might occur when running the command.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Identity

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-LegacyFormat

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

When specified, data is saved in the format used by Microsoft Lync Server 2010.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PoolFqdn

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Fully qualified domain name of the Registrar pool containing the user data to be exported. For example:

-PoolFqdn "atl-cs-001.litwareinc.com"

Parameter properties

Type:Fqdn
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PoolFqdn
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SqlInstanceName

Applicable: Skype for Business Server 2015, Skype for Business Server 2019

Name of the SQL Server instance containing the user data to be exported. For example:

-SqlInstanceName "rtc"

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SqlInstance
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UserFileFilter

Applicable: Skype for Business Server 2015, Skype for Business Server 2019

Full path to a text file containing a list of user URIs for whom data should be exported.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UserFilter

Applicable: Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

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"

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

None

The Export-CsUserData cmdlet creates new .ZIP files.