Get-CsClientPolicy

 

上次修改主題的時間:2017-05-17

重要重要事項:
This only applies to Skype for Business Online and not to Skype for Business Server or Lync on-premises deployments.
重要重要事項:
Please note that if your organization utilizes custom policies, then the UI will no longer correctly reflect the policy values. Once they are implemented they must continue to be managed via PowerShell.

Returns information about the client policies configured for use in your organization. Among other things, client policies help determine the features of that are available to 商務用 Skype Online users; for example, you might give some users the right to transfer files while denying this right to other users.

Get-CsClientPolicy [-Identity <XdsIdentity>] <COMMON PARAMETERS>

Get-CsClientPolicy [-Filter <String>] <COMMON PARAMETERS>

In Example 1, the Get-CsClientPolicy cmdlet is called without any additional parameters; this returns a collection of all the client policies configured for use in your organization.

Get-CsClientPolicy

In Example 2, the Get-CsClientPolicy cmdlet is used to return the per-user client policy that has an Identity SalesPolicy. Because identities are unique, this command will never return more than one item.

Get-CsClientPolicy -Identity SalesPolicy

Example 3 uses the Filter parameter to return all the client policies that have been configured at the per-user scope. The filter value "tag:*" tells the Get-CsClientPolicy cmdlet to return only those policies that have an Identity that begins with the string value "tag:".

Get-CsClientPolicy -Filter "tag:*"

Example 4 returns a collection of all the client policies where the DisableSavingIM property is True. To do this, the Get-CsClientPolicy cmdlet is first called without any parameters in order to return a collection of all the client policies configured for use in the organization. This collection is then piped to the Where-Object cmdlet, which selects only those policies where the DisableSavingIM property is equal to True.

Get-CsClientPolicy | Where-Object {$_.DisableSavingIM -eq $True}

In Example 5, the only client policies returned are the policies that meet two criteria: the DisableSavingIM property must be True and the EnableIMAutoArchiving property must be False. To do this, the command first calls the Get-CsClientPolicy cmdlet in order to return a collection of all the client policies configured for use in the organization. That collection is then piped to the Where-Object cmdlet, which picks out only those policies that meet both of the following criteria: DisableSavingIM must be equal to True and EnableIMAutoArchiving must be equal to False. The -and operator tells the Where-Object cmdlet that only objects that meet all the specified criteria should be selected.

Get-CsClientPolicy | Where-Object {$_.DisableSavingIM -eq $True -and $_.EnableIMAutoArchiving -eq $False}

Example 6 is a variation of the command shown in Example 5. This time, however, policies are selected as long as they meet at least one of the following criteria: either the DisableSavingIM property is True and/or the EnableIMAutoArchiving property is False. To accomplish this task, the command first calls the Get-CsClientPolicy cmdlet to return a collection of all the client policies configured for use in the organization. That collection is then piped to the Where-Object cmdlet, which picks out only those policies that meet at least one of the following criteria: DisableSavingIM is equal to True and/or EnableIMAutoArchiving is equal to False. The -or operator tells the Where-Object cmdlet that any object that meets at least one of the specified conditions should be selected.

Client policies are applied each time a user accesses the system, regardless of where the user logs on from and regardless of the type of device the user logs on with. In addition, client policies, like other 商務用 Skype Server 2015 policies, can readily be targeted to selected groups of users. You can even create a custom policy that gets assigned to a single user.

Client policies can be configured per-user scopes. The Get-CsClientPolicy cmdlet enables you to return information about all the client policies that have been configured for use in your organization.

 

Parameter Required Type Description

Filter

Optional

System.String

Enables you to use wildcard characters when indicating the policy (or policies) to be returned. To return a collection of all the per-user policies, use this syntax: -Filter "tag:*".

Identity

Optional

Microsoft.Rtc.Management.Xds.XdsIdentity

Unique identifier of the client policy to be returned. To refer to the global policy, use this syntax: -Identity global. To refer to a per-user policy, use syntax similar to this: -Identity SalesDepartmentPolicy.

If this parameter is omitted, then all the client policies configured for use in your organization will be returned.

None. The Get-CsClientPolicy cmdlet does not accept pipelined input.

The Get-CsClientPolicy cmdlet returns instances of the Microsoft.Rtc.Management.WritableConfig.Policy.Client.ClientPolicy object.

 
顯示: