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

Creates new instant messaging (IM) session archiving policies. These policies give you the ability to archive all IM sessions that take place between internal users, and/or to archive all IM sessions that take place between internal users and external partners.


New-CsArchivingPolicy -Identity <XdsIdentity> [-ArchiveExternal <$true | $false>] [-ArchiveInternal <$true | $false>] [-Confirm [<SwitchParameter>]] [-Description <String>] [-Force <SwitchParameter>] [-InMemory <SwitchParameter>] [-WhatIf [<SwitchParameter>]]


Parameter Required Type Description




Indicates the unique Identity assigned to the policy when it was created. New archiving policies can be created at the site or per-user scope. To create a new site policy, use the prefix "site:" and the name of the site as your Identity. For example, use this syntax to create a new policy for the Redmond site: -Identity site:Redmond. To create a new per-user policy, use an Identity similar to this: -Identity SalesArchivingPolicy.

Note that you cannot create a new global policy; if you want to make changes to the global policy, use the Set-CsArchivingPolicy cmdlet instead. Likewise, you cannot create a new site or per-user policy if a policy with that Identity already exists. If you need to make changes to an existing policy, use Set-CsArchivingPolicy.




Indicates whether internal IM sessions are archived. (An internal IM session is one in which all the participants are authenticated users who have Active Directory accounts within your organization.) The default value is False, which means that internal IM sessions are not archived.




Indicates whether external IM sessions are archived. (An external IM session is one in which at least one of the participants is an unauthenticated user who does not have an Active Directory account within your organization.) The default value is False, which means that IM sessions that include external users are not archived.




Enables administrators to provide a brief description of the archiving policy. For example, the Description might be used to detail which users the policy should be applied to.



Switch Parameter

Creates an object reference without actually committing the object as a permanent change. If you assign the output of this cmdlet called with this parameter to a variable, you can make changes to the properties of the object reference and then commit those changes by calling this cmdlet’s matching Set- cmdlet.



Switch Parameter

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



Switch Parameter

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



Switch Parameter

Prompts you for confirmation before executing the command.

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 Microsoft 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 that 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 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 (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; that means that a policy can be created and then applied to a specific user or a specific group of users. For example, you might have a global policy that archives internal IM sessions for all of your users. In addition, you might create a second policy, one that archives both internal and external sessions; this second policy might only be applied 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.

You can create new archiving policies (at either the site or the per-user scope) by using the New-CsArchivingPolicy cmdlet. If you create a policy at the site scope, it will automatically be applied to the site at the time the policy is created. If you create a policy at the per-user scope, that policy will not be used until you explicitly assign it to a user or set of users by calling the Grant-CsArchivingPolicy cmdlet.

Return Types

New-CsArchivingPolicy creates instances of the Microsoft.Rtc.Management.WriteableConfig.Policy.IM.IMArchivingPolicy object.


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

Copy Code
New-CsArchivingPolicy -Identity site:Redmond -ArchiveInternal $True

In Example 1, the cmdlet New-CsArchivingPolicy is used to create a new archiving policy with the Identity site:Redmond. In addition, the ArchiveInternal parameter is specified and set to True; that means that this new policy will enable archiving for internal IM sessions and Web conferences.

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

Copy Code
$x = New-CsArchivingPolicy -Identity site:Redmond -InMemory
$x.ArchiveInternal = $True
$x.ArchiveExternal = $True
Set-CsArchivingPolicy -Instance $x

Example 2 uses the InMemory parameter to create an archiving policy that initially exists only in memory. In this set of commands, New-CsArchivingPolicy is first called, along with the InMemory parameter, to create a new site policy with the Identity site:Redmond. This new, in-memory-only policy is stored in the variable $x. In commands 2 and 3, property values for this virtual policy are modified; in command 2 the value of the ArchiveInternal property is set of True ($True), and in command 3 the ArchiveExternal property is set to True. Finally, the last command in the example uses Set-CsArchivingPolicy to transform the virtual policy site:Redmond into an actual IM session archiving policy.