Removes the specified presence policy.
Syntax
Remove-CsPresencePolicy -Identity <XdsIdentity> [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-WhatIf [<SwitchParameter>]] |
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Identity |
Required |
Xds Identity |
Unique identifier for the presence policy to be removed. To remove a policy configured at the site scope, use syntax similar to this: -Identity "site:Redmond". To remove a policy configured at the per-user scope, use syntax similar to this: -Identity "RedmondPresencePolicy". Remove-CsPresencePolicy can also be run against the global policy; to do that, use this syntax: -Identity global. Note, however, that, if you do this, the global policy will not be removed. Instead, the properties within that policy will simply be reset to their default values. |
Force |
Optional |
Switch Parameter |
If present, causes Remove-CsPresencePolicy to delete the per-user policy even if the policy in question is currently assigned to at least one user. If not present, you will be asked to confirm the deletion request before 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
Presence information (which, among other things, lets you know whether a contact is available to take part in an instant messaging conversation) is invaluable. At the same time, however, there is a cost associated with presence information: the more presence subscriptions you have the more network bandwidth must be devoted to updating presence information. If network bandwidth is a concern, you might want to limit the number of presence subscriptions any one user can have.
The CsPresencePolicy cmdlets enable you to manage two important aspects of presence subscriptions: prompted subscribers and category subscriptions. When you are added to another person’s Microsoft Communicator contact list, the default behavior is for you to receive a pop-up notification informing you that you have been added to that list. Until you dismiss the resulting dialog box, each notification counts as a prompted subscriber. The presence policy’s MaxPromptedSubscriber property enables you to specify the maximum number of unresolved notification dialogs a user can have. (If a user reaches the maximum amount then he or she will not receive new contact notifications, at least not until some of those dialogs have been resolved.)
Category subscriptions represent a request for a specific category of information; for example, an application that requests calendar data. The MaxCategorySubscription property enables administrators to place a limit on the number of category subscriptions a user can have.
Prior to the release of Microsoft Communications Server 2010 prompted subscriber and category subscriptions were managed on a global basis. With the CsPresencePolicy cmdlets you can now manage these presence subscriptions at the global scope, the site scope, or even the per-user scope. This enables you to control bandwidth use while, at the same time, ensuring that users have access to the presence information they need to do their jobs.
Policies created at the site scope or the per-user scope can be removed at any time by running the Remove-CsPresencePolicy cmdlet. This cmdlet can also be run against the global policy; however, if you do this the global policy will not actually be removed. (Communications Server does not allow you to remove global policies.) Instead, the two properties in the global policy – MaxPromptedSubscriber and MaxCategorySubscription – will simply be reset to their default values.
Return Types
Remove-CsPresencePolicy deletes instances of the Microsoft.Rtc.Management.WriteableConfig.Policy.Presence.PresencePolicy object.
Examples
-------------------------- Example 1 ------------------------
Copy Code | |
---|---|
Remove-CsPresencePolicy -Identity "RedmondPresencePolicy" |
The preceding command deletes the per-user presence policy with the Identity RedmondPresencePolicy.
-------------------------- Example 2 ------------------------
Copy Code | |
---|---|
Get-CsPresencePolicy -Filter "tag:*" | Remove-CsPresencePolicy |
The command shown in Example 2 removes all the presence policies that have been configured at the per-user scope. (These policies have an Identity that begins with the prefix "tag:" The tag: prefix provides a way to filter on per-user policies.). To carry out this task, the command first uses Get-CsPresencePolicy and the –Filter parameter to return all the per-user presence policies; the filter value "tag:*" limits the returned data to policies where the Identity begins with the string value "tag:". This filtered collection is then piped to Remove-CsPresencePolicy, which, in turn, deletes each policy in the collection.
-------------------------- Example 3 ------------------------
Copy Code | |
---|---|
Get-CsPresencePolicy | Where-Object {$_.MaxPromptedSubscriber -gt 500} | Remove-CsPresencePolicy |
Example 3 deletes all the presence policies that allow more than 500 prompted subscribers. To do this, the command first calls get-CsPresencePolicy without any parameters in order to return a collection of all the presence policies configured for use in the organization. This collection is then piped to the Where-Object cmdlet, which picks out only those policies where the MaxPromptedSubscriber property is greater than (-gt) 500. In turn, that filtered collection is then piped to Remove-CsPresencePolicy, which deletes all the presence policies that allow more than 500 prompted subscribers.