Modifies an existing presence policy.
Syntax
Set-CsPresencePolicy [-Identity <XdsIdentity>] [-Confirm [<SwitchParameter>]] [-Description <String>] [-Force <SwitchParameter>] [-MaxCategorySubscription <UInt16>] [-MaxPromptedSubscriber <UInt16>] [-WhatIf [<SwitchParameter>]] |
Set-CsPresencePolicy [-Confirm [<SwitchParameter>]] [-Description <String>] [-Force <SwitchParameter>] [-Instance <PSObject>] [-MaxCategorySubscription <UInt16>] [-MaxPromptedSubscriber <UInt16>] [-WhatIf [<SwitchParameter>]] |
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Identity |
Unique identifier for the presence policy to be modified. To modify the global policy, use this syntax: -Identity global. To modify a policy at the site scope, use syntax similar to this: -Identity "site:Redmond". To modify a per-user policy, use syntax like this: -Identity "RedmondPresencePolicy". |
||
Instance |
Allows you to pass a reference to an object to the cmdlet rather than set individual parameter values. |
||
MaxPromptedSubscriber |
The maximum number of promoted subscribers a user can have at any one time. By default, any time you are added to another user’s contact list a notification dialog appears on screen informing you of this fact, and giving you the chance to do such things as add the person to your own contact list or block the person from viewing your presence. Until you take action and dismiss the dialog box, each notification counts as a prompted subscriber. MaxPromptedSubscriber can be set to any integer value between 0 and 600, inclusive; the default value is 200. If you set this value to 0 users will not receive any notifications when they are added to another user’s contact list. |
||
MaxCategorySubscription |
The maximum number of category subscriptions allowed at any one time. A category subscription represents a request for a specific category of information; for example, an application that requests calendar data. MaxCategorySubscription can be set to any integer value between 0 and 3000; the default value is 1000. |
||
Force |
Suppresses the display of any non-fatal error message that might arise when running the command. |
||
WhatIf |
Describes what would happen if you executed the command without actually executing the command. |
||
Confirm |
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.
The Set-CsPresencePolicy cmdlet enables you to modify any of the presence policies configured for use in your organization. Modifying a presence policy simply means changing the value of the MaxPromptedSubscriber property and/or the MaxCategorySubscription property.
Return Types
Set-CsPresencePolicy does not return any values or objects. Instead, the cmdlet modifies existing instances of the Microsoft.Rtc.Management.WriteableConfig.Policy.Presence.PresencePolicy object.
Examples
-------------------------- Example 1 ------------------------
Copy Code | |
---|---|
Set-CsPresencePolicy -Identity "RedmondPresencePolicy" -MaxPromptedSubscriber 300 |
The command shown in Example 1 modifies the per-user presence policy RedmondPresencePolicy. In this example, the value of the MaxPromptedSubscriber property is set to 300.
-------------------------- Example 2 ------------------------
Copy Code | |
---|---|
Get-CsPresencePolicy | Set-CsPresencePolicy -MaxPromptedSubscriber 300 |
The command shown in Example 2 is a variation of the command uses in Example 1; in this case, however, the MaxPromptedSubscriber property is set to 300 for all the presence policies configured for use in the organization. To do this, the command first calls Get-CsPresencePolicy without any parameters; this returns a collection of all the presence policies configured for use in the organization. This collection is then piped to Set-CsPresencePolicy, which sets the value of the MaxPromptedSubscriber of each policy in the collection to 300.
-------------------------- Example 3 ------------------------
Copy Code | |
---|---|
Get-CsPresencePolicy | Where-Object {$_.MaxPromptedSubscriber -gt 300} | Set-CsPresencePolicy -MaxPromptedSubscriber 300 |
Example 3 shows how you can configure the presence policies in your organization to ensure that no policy allows more than 300 prompted subscribers. To carry out this task, the command first calls Get-CsPresencePolicy (without any parameters) in order to return a collection of all the presence policies in the organization. This collection is then piped to the Where-Object cmdlet, which picks out only the policies where the value of the MaxPromptedSubscriber policy is greater than (-gt) 300. The filtered collection is then piped to Set-CsPresencePolicy, which takes each policy in the collection and sets the maximum number of prompted subscribers to 300. As a result, no policy will allow more than 300 prompted subscribers, although some policies might allow fewer than 300 subscribers.