Remove-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.

Removes an existing client policy. Among other things, client policies help determine the features of 商務用 Skype that are available to users; for example, you might give some users the right to transfer files while denying this right to other users.

Remove-CsClientPolicy -Identity <XdsIdentity> [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

In Example 1, the Remove-CsClientPolicy cmdlet is used to delete the client policy that has the Identity SalesPolicy.

Remove-CsClientPolicy -Identity SalesPolicy

In Example 2, the Get-CsClientPolicy cmdlet and the Remove-CsClientPolicy cmdlet are used to delete all the client policies that have been configured at the per-user scope. The command uses the Get-CsClientPolicy cmdlet and the Filter parameter to return a collection of all the client policies configured at the per-user scope; the filter value "tag:*" tells the Get-CsClientPolicy cmdlet to limit the retrieved data to client policies that have an Identity that begins with the string value "tag:". The filtered collection is then piped to the Remove-CsClientPolicy cmdlet, which removes each policy in the collection.

Get-CsClientPolicy -Filter "tag:*" | Remove-CsClientPolicy

Example 3 deletes all the client policies where the EnableAppearOffline property is set to True. To do this, the Get-CsClientPolicy cmdlet is first called without any additional parameters; that returns a collection of all the client 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 EnableAppearOffline property is equal to True. In turn, this filtered collection is piped to the Remove-CsClientPolicy cmdlet, which deletes each policy in the collection.

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

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 toward selected groups of users. You can even create a custom policy that gets assigned to a single user.

Client policies can be configured at the global and per-user scopes. Policies that have been configured at the per-user scope can later be deleted by using the Remove-CsClientPolicy cmdlet.

 

Parameter Required Type Description

Identity

Required

Microsoft.Rtc.Management.Xds.XdsIdentity

Unique identifier for the client policy to be removed. To "remove" the global policy, use the following syntax: -Identity global. To remove a per-user policy, use syntax similar to this: -Identity "SalesDepartmentPolicy". You cannot use wildcards when specifying a policy Identity.

Confirm

Optional

System.Management.Automation.SwitchParameter

Confirm 參數會使得命令暫停處理,並要求確認命令將進行的動作,之後才會繼續處理。您不需要利用 Confirm 參數指定任何值。

Force

Optional

System.Management.Automation.SwitchParameter

If this parameter is present, the policy will automatically be removed even if it is currently assigned to at least one user. If this parameter is not present, then the Remove-CsClientPolicy cmdlet 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

System.Management.Automation.SwitchParameter

WhatIf 參數會指示命令模擬它將對物件採取的動作。透過使用 WhatIf 參數,不需要套用任何變更,就能檢視變更。您不需要利用 WhatIf 參數指定值。

Microsoft.Rtc.Management.WritableConfig.Policy.Client.ClientPolicy object. The Remove-CsClientPolicy cmdlet accepts pipelined instances of the client policy object.

The Remove-CsClientPolicy cmdlet does not return a value. Instead, the cmdlet deletes instances of the Microsoft.Rtc.Management.WritableConfig.Policy.Client.ClientPolicy object.

 
顯示: