[This is preliminary documentation and is subject to change. Blank topics are included as placeholders.]

Enables you to export (in XML) format records that have been stored in the Microsoft Communications Server 2010 archiving database.

Syntax

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

Parameters

Parameter Required Type Description

DBInstance

Required

String

Path to the SQL Server database instance where archiving data is recorded. For example, DBSERVER\Archinst.

OutputFolder

Required

String

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

StartDate

Required

DateTime

Indicates the earliest activity date for the records to be exported. For example, if you set the start date to 6/1/2010 (June 1, 2010, in US English) any items recorded in the database prior to that date (for example, items recorded on May 31, 2010) will be excluded from the export. Note that you can only specify a date, such as 6/1/2010; you cannot specify a date-time value such as 6/1/2010 11:00 AM.

EndDate

Optional

DateTime

Indicates the latest activity date for records to be exported. For example, if you set the end date to 6/1/2010 (June 1, 2010, in US English) any items recorded in the database after that date (for example, items recorded on June 2, 2010) will be excluded from the export. Note that you can only specify a date such as 6/1/2010; you cannot specify a date time value such as 6/1/2010 11:00 AM. Although you will not receive an error message, your export will fail if the end date occurs before the start date (e.g., an end date of 1/1/2010 and a start date of 6/1/2010).

UserUri

Optional

String

Enables you export archiving data for a single user; this is done by using the –UserUri parameter and specifying the URI of the user (for example, "Ken Myer"). Valid URIs include a user’s Active Directory display name; a user’s UPN; a user’s email address; or a user’s domain name\logon name (for example, litwareinc\kenmyer). The -UserUri parameter will accept only one URI at a time.

ExcludeWebConfArchive

Optional

Switch Parameter

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

Purge

Optional

Switch Parameter

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

WhatIf

Optional

Switch Parameter

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

Confirm

Optional

Switch Parameter

Prompts you for confirmation before executing the command.

Detailed Description

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

Regardless of the reason, Communications Server 2010 gives you considerable flexibility when it comes to archiving instant message and Web conferencing sessions. If you have deployed Archiving Server, you can use the various CsArchivingConfiguration cmdlets to do such things as enable and disable instant message archiving and to manage your archiving database. In fact, you can even choose to suspend instant messaging should archiving fail; that helps to ensure that you keep a record of all your electronic communications.

If you have enabled archiving then records of your users’ electronic communications are stored in the Archiving Server 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 a .XML file.

Return Types

Export-CsArchivingData returns archiving database records in XML format.

Examples

-------------------------- Example 1 ------------------------

Copy Code
Export-CsArchivingData -DBInstance DBSERVER\Archinst -StartDate 1/1/2010 -OutputFolder "C:\ArchivingExports"

The command shown in Example 1 extracts records from the archiving database DBSERVER\Archinst and saves the resulting XML file to the folder C:\ArchivingExports. The specified start date of January 1, 2010 (-StartDate 1/1/2010) ensures that only items recorded in the database after 12/31/2009 (one day prior to the start date) will be exported.

-------------------------- Example 2 ------------------------

Copy Code
Export-CsArchivingData -DBInstance DBSERVER\Archinst -StartDate 1/1/2010 -OutputFolder "C:\ArchivingExports" -UserUri "Ken Myer"

The preceding command 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 the appropriate user Identity.

-------------------------- Example 3 ------------------------

Copy Code
Export-CsArchivingData -DBInstance DBSERVER\Archinst -StartDate 1/1/2010 -EndDate 1/31/2010 -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 January 2010 are exported. To limit exporting to this time interval, the -EndDate parameter was included along with the -StartDate parameter. With an end date of January 31, 2010 and a start date of January 1, 2010 that effectively limits exporting to items recorded during January 2010.