Remove-CsClientPolicy

 

Topic Last Modified: 2017-05-17

ImportantImportant:
This only applies to Skype for Business Online and not to Skype for Business Server or Lync on-premises deployments.
ImportantImportant:
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 for Business 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 for Business 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

The Confirm switch causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm switch.

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

The WhatIf switch instructs the command to simulate the actions that it would take on the object. By using the WhatIf switch, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf switch.

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.

 
Show: