Edit

Share via


Export-CsArchivingData

Enables you to export records that have been stored in the Skype for Business Server Archiving database. This cmdlet was introduced in Lync Server 2010.

Syntax

ExcludeWebConfArchiveSet

Export-CsArchivingData
    -DBInstance <String>
    -OutputFolder <String>
    -StartDate <DateTime>
    -Identity <XdsIdentity>
    [-EndDate <DateTime>]
    [-UserUri <String>]
    [-ExcludeWebConfArchive]
    [-WhatIf]
    [-Confirm]
    [-IncludeTrustedApplication]
    [-Force]
    [-Purge]
    [<CommonParameters>]

PurgeSet

Export-CsArchivingData
    -DBInstance <String>
    -OutputFolder <String>
    -StartDate <DateTime>
    -Identity <XdsIdentity>
    [-EndDate <DateTime>]
    [-UserUri <String>]
    [-Purge]
    [-WhatIf]
    [-Confirm]
    [-IncludeTrustedApplication]
    [-ExcludeWebConfArchive]
    [-Force]
    [<CommonParameters>]

ByDbInstance

Export-CsArchivingData
    -DBInstance <String>
    -OutputFolder <String>
    -StartDate <DateTime>
    [-Confirm]
    [-EndDate <DateTime>]
    [-ExcludeWebConfArchive]
    [-Force]
    [-IncludeTrustedApplication]
    [-Purge]
    [-UserUri <String>]
    [-WhatIf]
    [<CommonParameters>]

ByIdentity

Export-CsArchivingData
    -Identity <XdsIdentity>
    -OutputFolder <String>
    -StartDate <DateTime>
    [-Confirm]
    [-EndDate <DateTime>]
    [-ExcludeWebConfArchive]
    [-Force]
    [-IncludeTrustedApplication]
    [-Purge]
    [-UserUri <String>]
    [-WhatIf]
    [<CommonParameters>]

Description

Many organizations find it useful to keep a transcript of all the instant messaging (IM) sessions carried out by their users. Other organizations find it mandatory to keep such transcripts. For example, organizations in the financial world are often required by law to keep copies of all their electronic communications.

Regardless of the reason, Skype for Business Server gives you flexibility when it comes to archiving IM and conferencing sessions. If you have deployed Archiving Server, you can use the various CsArchivingConfiguration cmdlets to enable and disable instant message archiving and to manage your Archiving database. You can also suspend IM should archiving fail, which helps ensure that you keep a record of all your electronic communications.

If you have enabled archiving, records of your users' electronic communications are stored in the Archiving database. If you would like to view all of these records (or a selected subset of these records), you can use the Export-CsArchivingData cmdlet to extract these records from the database and save them as an Outlook Express Electronic Mail (EML) file (.EML file extension).

By default, members of the following groups are authorized to run the Export-CsArchivingData 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-CsArchivingData"}

Examples

Example 1

Export-CsArchivingData -Identity "ArchivingDatabase:atl-sql-001.litwareinc.com" -StartDate 6/1/2018 -OutputFolder "C:\ArchivingExports"

The command shown in Example 1 extracts records from the Archiving database located on the server atl-sql-001.litwareinc.com, and then saves the resulting EML file to the folder C:\ArchivingExports. The specified start date of June 1, 2018 (-StartDate 6/1/2018) ensures that only items recorded in the database after 5/31/2018 will be exported.

Example 2

Export-CsArchivingData -Identity "ArchivingDatabase:atl-sql-001.litwareinc.com" -StartDate 6/1/2018 -OutputFolder "C:\ArchivingExports" -UserUri "kenmyer@litwareinc.com"

Example 2 is a variation of the command shown in Example 1; in this case, however, only the records pertaining to the user Ken Myer are exported. To limit your export to records pertaining to a single user, include the UserUri parameter followed by appropriate SIP address.

Example 3

Export-CsArchivingData -Identity "ArchivingDatabase:atl-sql-001.litwareinc.com" -StartDate 6/1/2018 -EndDate 6/30/2018 -OutputFolder "C:\ArchivingExports"

Example 3 represents another variation of the command shown in Example 1. In Example 3, however, only items recorded in the database during the month of June, 2018 are exported. To limit exporting to this time interval, the EndDate parameter is included along with the StartDate parameter. With a start date of June 1, 2018 and an end date of June 30, 2018, exporting is limited to items recorded during June 2018.

Parameters

-Confirm

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

Prompts you for confirmation before executing the command.

Parameter properties

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

Parameter sets

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

-DBInstance

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

This parameter is intended for use only with Microsoft Lync Server 2010. If you are using the Export-CsArchivingData cmdlet on Skype for Business Server you should use the Identity parameter instead.

Path to the SQL Server database instance where archiving data is recorded. For example: "atl-sql-001\Archinst"

Parameter properties

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

Parameter sets

ExcludeWebConfArchiveSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
PurgeSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByDbInstance
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EndDate

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

Indicates the latest activity date for records to be exported. For example, if you set the end date to 6/1/2018 (June 1, 2018, in U.S. English) any items recorded in the database after that date (for example, items recorded on June 2, 2018) will be excluded from the export. Although you will not receive an error message, your export will fail if the end date occurs before the start date (for example, an end date of 1/1/2018 and a start date of 6/1/2018).

Use the date-time formats specified by your Regional and Language Options settings when assigning values to the StartDate and EndDate properties.

If an end date is not specified then the current date will be used.

Parameter properties

Type:DateTime
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

-ExcludeWebConfArchive

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

Instructs the Export-CsArchivingData cmdlet to only export instant messaging records. By default, the cmdlet exports both IM and conferencing records.

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

-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

Service identity of the archiving database to be exported. For example:

-Identity "ArchivingDatabase:atl-sql-001.litwareinc.com"

You can also specify the database by using just the pool name:

-Identity "atl-sql-001.litwareinc.com"

You can retrieve the service identities for your archiving databases by using this command:

Get-CsService -ArchivingDatabase | Select-Object Identity

Parameter properties

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

Parameter sets

ExcludeWebConfArchiveSet
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False
PurgeSet
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False
ByIdentity
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-IncludeTrustedApplication

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

Include data logged by trusted applications (CAA/CAS) when exporting records.

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

-OutputFolder

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

Full path to the folder where the exported data should be stored (for example, C:\ArchivingExports). If this folder does not exist, then the Export-CsArchivingData cmdlet will create it.

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

-Purge

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

When included, the Purge parameter causes any record that has been successfully exported to be deleted from the Archiving database. If you do not include this parameter, exported records will be retained in the database.

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

-StartDate

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

Indicates the earliest activity date for the records to be exported. For example, if you set the start date to 6/1/2018 (June 1, 2018, in U.S. English) any items recorded in the database prior to that date (for example, items recorded on May 31, 2018) will be excluded from the export.

Use the date-time formats specified by your Regional and Language Options settings when assigning values to the StartDate and EndDate properties.

Parameter properties

Type:DateTime
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

-UserUri

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

Enables you to export archiving data for a single user; this is done by using the UserUri parameter and specifying the SIP address of the user. The UserUri parameter will accept only one URI at a time.

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

-WhatIf

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

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

Parameter properties

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

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-CsArchivingData cmdlet returns Archiving database records in EML format.