Edit

Share via


Export-CsConfiguration

Exports your Skype for Business Server topology, policies, and configuration settings to a file. Among other things, this file can then be used to restore this information to the Central Management store after an upgrade, a hardware failure, or some other issue has resulted in data loss. This cmdlet was introduced in Lync Server 2010.

Syntax

FileName

Export-CsConfiguration
    [-FileName] <String>
    [-Force]
    [-LocalStore]
    [<CommonParameters>]

AsBytes

Export-CsConfiguration
    [-AsBytes]
    [-Force]
    [-LocalStore]
    [<CommonParameters>]

Description

Computers that run Skype for Business Server services or server roles must have a copy of the current topology, current configuration settings, and current policies before they can function in their appointed role. Skype for Business Server is responsible for ensuring that this information is passed along to each computer that needs it.

The Export-CsConfiguration cmdlet and the Import-CsConfiguration cmdlet are used to backup and restore your Skype for Business Server topology, configuration settings, and policies during a Central Management store upgrade. The Export-CsConfiguration cmdlet enables you to export data to a .ZIP file; you can then use the Import-CsConfiguration cmdlet to read that .ZIP file and restore the topology, configuration settings, and policies to the Central Management store. After that, the replication services of Skype for Business Server will replicate the restored information to other computers running Skype for Business Server services.

The ability to export and import configuration data is also used when initially configuring computers located in your perimeter network (for example, Edge Servers). When configuring a computer in the perimeter network, you must first perform a manual replication using the CsConfiguration cmdlets: you will need to export the configuration data using the Export-CsConfiguration cmdlet and then copy the .ZIP file to the computer in the perimeter network. After that, you can use the Import-CsConfiguration cmdlet and the LocalStore parameter to import the data. You only need to do this once; after that, replication will take place automatically.

By default, members of the following groups are authorized to run the Export-CsConfiguration cmdlet locally: RTCUniversalServerAdmins. 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-CsConfiguration"}

Examples

Example 1

Export-CsConfiguration -FileName "C:\Config.zip"

The command shown in Example 1 exports Skype for Business Server data from the Central Management store to a file named C:\Config.zip.

Parameters

-AsBytes

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

Returns topology information as a byte array; the returned data must then be stored in a variable in order to be used by the Import-CsConfiguration cmdlet. You cannot use both AsBytes and FileName in the same command.

Parameter properties

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

Parameter sets

AsBytes
Position:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FileName

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

Path to the .ZIP file to be created when you run the Export-CsConfiguration cmdlet. For example:

-FileName "C:\Config.zip".

Note that you must include either the FileName or the AsBytes parameters, but not both, when calling the Export-CsConfiguration cmdlet.

Parameter properties

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

Parameter sets

FileName
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Applicable: Lync Server 2010, 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. To set the Force parameter to True use this syntax:

-Force:$True

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

-LocalStore

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

Retrieves the configuration data from the local computer rather than from the Central Management store itself.

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

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

System.Byte

If called along with the AsBytes parameter, the Export-CsConfiguration cmdlet returns configuration information in the form of a byte array.