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

Returns information about your instant messaging (IM) session archiving policies. Archiving policies enable you to archive all IM and Web conferencing sessions that take place between internal users and/or between internal users and federated partners.

Syntax

Get-CsArchivingPolicy [-Identity <XdsIdentity>] [-LocalStore <SwitchParameter>]
Get-CsArchivingPolicy [-Filter <String>] [-LocalStore <SwitchParameter>]

Parameters

Parameter Required Type Description

Identity

Optional

XdsIdentity

Indicates the unique identifier of the archiving policy to be returned. To refer to the global policy, use this syntax: -Identity global. To refer to a site policy, use syntax similar to this: -Identity site:Redmond. To refer to a per-user policy, use syntax similar to this: -Identity RedmondArchivingPolicy. If this parameter is omitted, then all of the archiving policies configured for use in your organization will be returned.

Filter

Optional

String

Enables you to use wildcard characters when indicating the policy (or policies) to be returned. For example, to return all of the policies configured at the site scope, use this syntax: -Filter "site:*". This command works because any policy configured at the site scope must have an Identity (the only property you can filter on) that begins with the string value "site:". To return a collection of all the per-user policies that have an Identity that begins with "Sales", use this syntax: -Filter "Sales*".

LocalStore

Optional

Switch Parameter

This parameter is for testing purposes only.

Detailed Description

Many organizations find it useful to keep an archive of all the IM sessions that their users take part in; other organizations are legally required to keep such an archive. In order to archive IM sessions with Communications Server 2010, you must perform two steps. First, you need to enable archiving at the global and/or the site scope by using the Set-CsArchivingConfiguration cmdlet. This gives you the ability to archive IM sessions; however, it does not automatically begin archiving those sessions.

Instead, to actually save transcripts of your IM sessions you must complete step 2: create one or more IM session archiving policies. These policies determine which users will have their IM sessions recorded as well as which type of IM sessions (internal and/or external) will be archived. Internal IM sessions are sessions where all of the participants are authenticated users who have Active Directory accounts within your organization; external IM sessions are sessions where at least one participant is an unauthenticated user who does not have an Active Directory account within your organization. You can choose to archive only internal sessions, only external sessions, or both internal and external sessions.

Archiving policies (which are created with the New-CsArchivingPolicy cmdlet) can be assigned to the global site or to the site scope. In addition, these policies can be assigned to the per-user scope; this means that a policy can be created and then applied to a specific user or a specific set of users. For example, you might have a global policy that archives internal IM sessions for all your users. In addition, you might create a second policy, one that archives both internal and external sessions. You might then choose to apply that policy to your sales staff. Because per-user policies take precedence over global and site policies, members of the sales staff will have all their IM sessions archived. Other users (that is, users who are not part of the sales department and thus are not affected by the sales policy) will have only their internal IM sessions archived.

The Get-CsArchivingPolicy cmdlet provides a way for you to return information about the archiving policies that have been configured for use in your organization. Again, note that these policies are enforced only if IM session archiving has been enabled at the global or site scope. To determine whether or not IM session archiving has been enabled, use the Get-CsArchivingConfiguration cmdlet.

Return Types

Get-CsArchivingPolicy returns instances of the Microsoft.Rtc.Management.WriteableConfig.Policy.IM.IMArchivingPolicy object.

Examples

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

Copy Code
Get-CsArchivingPolicy

Example 1 shows the simplest use of Get-CsArchivingPolicy: calling the cmdlet by itself, without any parameters. This causes the cmdlet to return a collection of all the archiving policies currently in use in your organization.

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

Copy Code
Get-CsArchivingPolicy -Identity site:Redmond

In Example 2, Get-CsArchivingPolicy is used to return the archiving policy with the Identity site:Redmond. Because identities must be unique, this command will always return, at most, a single policy.

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

Copy Code
Get-CsArchivingPolicy -Filter tag:*

The preceding command returns a collection of all the IM session archiving policies that have been configured at the per-user scope. This is done by including the Filter parameter and the filter value "tag:*". That filter value instructs Get-CsArchivingPolicy to return only those policies that have an identity beginning with the string value "tag:". When you create a per-user policy you do not need to include the tag: prefix in the Identity. However, tag: is – under the covers – always the prefix to a per-user policy Identity. Because of that, you can return a collection of all your per-user policies simply by using the filter value "tag:".

-------------------------- Example 4 --------------------------

Copy Code
Get-CsArchivingPolicy | Where-Object {$_.ArchiveInternal -eq $False}

Example 4 returns a collection of all the archiving policies where the archiving of internal IM sessions has been disabled. To do this, Get-CsArchivingPolicy is first used to return a collection of all the archiving policies currently in use. That collection is then piped to the Where-Object cmdlet. In turn, Where-Object applies a filter that restricts the returned data to those policies where the ArchiveInternal property is set to False.

-------------------------- Example 5 --------------------------

Copy Code
Get-CsArchivingPolicy | Where-Object {$_.ArchiveInternal -eq $False -and $_.ArchiveExternal -eq $False}

Example 5 is similar to Example 4; in this case, however, the command returns all of the archiving policies where both internal and external archiving are disabled. To accomplish this, Get-CsArchivingPolicy is first used to return a collection of all the I archiving policies currently in use. That collection is then "piped" to Where-Object, which picks out those policies where both the ArchiveInternal and the ArchiveExternal properties are equal to (-eq) False ($False). The -and operator tells Where-Object to select only those policies that meet all the specified criteria.