Removes the specified instant messaging (IM) archiving policy. IM archiving policies determine whether Microsoft Communications Server 2010 will automatically save all IM sessions that take place between internal users, and/or all IM sessions between internal users and federated partners.
Syntax
Remove-CsArchivingPolicy -Identity <XdsIdentity> [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-WhatIf [<SwitchParameter>]] |
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Identity |
Required |
XdsIdentity |
Unique identifier for the archiving policy to be removed. Archiving policies can be configured at the global, site, or per-user scopes. To remove the global policy, use this syntax: -Identity global. (Note that the global policy cannot actually be removed. Instead, all of the policy properties will be reset to their default values.) To remove a site policy, use syntax similar to this: -Identity site:Redmond. To remove a per-user policy, use syntax similar to this: -Identity SalesArchivingPolicy. Wildcards are not allowed when specifying an Identity. |
Force |
Optional |
Switch Parameter |
If this parameter is present, the policy will automatically be removed even if it is currently assigned to at least one use. If this parameter is not present, then Remove-CsArchivingPolicy will not automatically remove a per-user policy that is assigned to at least one user. Instead, a confirmation prompt will appear asking if you are sure that you want to remove the policy. You must answer yes (by pressing the Y key) before the command will continue and the policy will be removed. |
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 an archive of all of 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, and to actually save transcripts of your IM sessions, you must complete step 2: create one or more 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 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 using the New-CsArchivingPolicy cmdlet) can be assigned to the global scope 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 set 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. You might then decide to apply that policy only 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 are not affected by the sales policy) will have only their internal IM sessions archived.
The Remove-CsArchivingPolicy cmdlet enables you to delete an archiving policy that has been created for use in your organization. If you delete a per-user policy, all of the users who have been assigned that policy will automatically fall under the jurisdiction of the relevant site policy. If there is no site policy, then those users will be governed by the global policy. If you remove a site policy, users who were affected by that policy will automatically fall under the jurisdiction of the global policy.
Note that you can run Remove-CsArchivingPolicy against the global policy; however, the global policy cannot be removed. Instead, running Remove-CsArchivingPolicy against the global policies causes all the properties in that policy to be reset to their default values. In this case, that means that neither internal nor external IM sessions will be archived. That’s because the default value for both these properties (ArchiveInternal and ArchiveExternal) is False.
Return Types
Remove-CsArchivingPolicy does not return a value or object. Instead, the cmdlet removes instances of the Microsoft.Rtc.Management.WriteableConfig.Policy.IM.IMArchivingPolicy object.
Examples
-------------------------- Example 1 --------------------------
Copy Code | |
---|---|
Remove-CsArchivingPolicy -Identity site:Redmond |
In the preceding example, Remove-CsArchivingPolicy is used to delete the policy with the Identity site:Redmond. Note that, when a policy configured at the site scope is deleted, users previously managed by the site policy will automatically use the global archiving policy instead.
-------------------------- Example 2 --------------------------
Copy Code | |
---|---|
Get-CsArchivingPolicy -Filter site:* | Remove-CsArchivingPolicy |
In Example 2, all of the archiving policies that have been configured at the site scope are removed. This is done by using Get-CsArchivingPolicy and the Filter parameter to retrieve a collection of all the archiving policies configured at the site scope. The Filter parameter does this by using the filter value "site:*", which instructs Get-CsArchivingPolicy to return only those policies that have an Identity (the only property you can filter on) that begins with the string value "site:". After the collection has been returned, it is piped to Remove-CsArchivingPolicy, which deletes all the policies in the collection.
-------------------------- Example 3 --------------------------
Copy Code | |
---|---|
Get-CsArchivingPolicy | Where-Object {$_.ArchiveExternal -eq $False} | Remove-CsArchivingPolicy |
The preceding command deletes all the archiving policies (regardless of scope) where the ArchiveExternal property is set to False. To do this, Get-CsArchivingPolicy is first used to return a collection of all the archiving policies configured for use in the organization. That collection is then piped to the Where-Object cmdlet, which picks out those policies where the ArchiveExternal property is equal to (-eq) False ($False). The filtered collection is then passed to Remove-CsArchivingPolicy, which deletes each policy in the collection.