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

Adds new options to Microsoft Communications Server client policies/

Syntax

New-CsClientPolicyEntry -Name <String> -Value <String>

Parameters

Parameter Required Type Description

Name

Required

String

Name of the new policy entry. For example: -Name "OnlineFeedbackURL".

Value

Required

String

Value to be assigned to the new policy entry. For example: -Value http://www.litwareinc.com/feedback.

Detailed Description

Client policies are the primary mechanism used by Microsoft Communications Server in order to manage client software such as Microsoft Communicator. When you create or configure a client policy, you have numerous options available for you; for example, you specify whether or not photos should be used in Microsoft Communicator; whether or not emoticons will be allowed in instant messages; whether or not Communicator will automatically save transcripts of instant messaging sessions; etc. These options cover many of the client-related settings that administrators need to manage.

However, they might not cover all the client settings that administrators need to manage. In order to add management flexibility and extensibility, client policies include a property named PolicyEntry. This multi-valued property enables administrators to add new management options not explicitly called out in client policies. For example, during the beta release of Microsoft Communications Server beta testers were given the ability to add a feedback option to Communicator. This option was added as a new policy entry, and was created using New-CsClientPolicyEntry.

Note that you cannot arbitrarily create new policy entries and expect those entries to somehow be capable of managing Microsoft Communicator or other client applications. Instead, you will need to wait for official notice of names and values that can be used to construct new client policy entries.

Return Types

New-CsClientPolicyEntry creates new instances of the Microsoft.Rtc.Management.WriteableConfig.Policy.Client.PolicyEntryType object.

Examples

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

Copy Code
$x = New-CsClientPolicyEntry -Name "OnlineFeedbackURL" -Value "http://www.litwareinc.com/feedback"

$y = Get-CsClientPolicy -Identity global
$y.PolicyEntry.Add($x)

Set-CsClientPolicy -Instance $y

The commands shown in Example 1 demonstrate how a new policy entry can be added to the global client policy; in particular, the example adds a new feedback option to Microsoft Communicator. (Note that this example is for demonstration purposes. You should not expect to be able to run the commands and add a similar feedback option to your copy of Microsoft Communicator.)

In order to add the new policy entry, the first command in the example uses New-CsClientPolicyEntry to create an entry with the Name OnlineFeedbackURL and the Value http://www.litwareinc.com/feedback. The resulting policy entry object is then stored in a variable named $x.

In the second command, Get-CsClientPolicy is used to create an object reference ($y) to the global client policy. The following command then uses the Add method to add the new policy entry to the PolicyEntry property. If PolicyEntry already has one or more entries the new value will simply be appended to the end of that collection.

Finally, the last command in the example uses Set-CsClientPolicy to write the changes to the actual global policy. If you do not call Set-CsClientPolicy your changes will exist only in memory, and will disappear as soon as you terminate Windows PowerShell or delete the variable $x.

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

Copy Code
$x = New-CsClientPolicyEntry -Name "OnlineFeedbackURL" -Value "http://www.litwareinc.com/feedback"
Set-CsClientPolicy -Identity global -PolicyEntry $x

Example 2 is a variation of the commands shown in Example 1. In this case, however, the new policy entry replaces all the items currently in the global policy’s PolicyEntry property. To do that, the first command in the example creates a new policy entry that is stored in a variable named $x. The second command then uses Set-CsClientPolicy to set the value of the PolicyEntry property to $x. After the command completes the only item in the PolicyEntry property will be the new entry. Any items contained in that property before the command was run will be deleted.