Topic Last Modified: 2013-03-07

Removes a presence provider previously configured for use in the organization. Presence providers represent the PresenceProviders property of a collection of user services configuration settings. This cmdlet was introduced in Lync Server 2013.

Syntax

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

Examples

Example 1

The command shown in Example 1 removes the presence provider with the Identity "global/fabrikam.com".

Copy Code
Remove-CsPresenceProvider -Identity "global/fabrikam.com"

Example 2

In Example 2, all the presence providers configured for use in the organization are removed. To do this, the command first calls the Get-CsPresenceProvider cmdlet without any parameters; that returns a collection of all the configured presence providers. That collection is then piped to the Remove-CsPresenceProvider cmdlet, which deletes each item (that is, each provider) in the collection.

Copy Code
Get-CsPresenceProvider | Remove-CsPresenceProvider

Example 3

Example 3 shows how you can delete all the presence providers that have an Fqdn that includes the string value "fabrikam.com". To carry out this task, the command first uses the Get-CsPresenceProvider cmdlet to return a collection of all the available presence providers. That collection is then piped to the Where-Object cmdlet, which picks out only those providers where the Fqdn property includes (-match) the string value "fabrikam.com". In turn, that filtered collection is then piped to the Remove-CsPresenceProvider cmdlet, which deletes each provider in the filtered collection.

Copy Code
Get-CsPresenceProvider | Where-Object {$_.Fqdn -match "fabrikam.com"} | Remove-CsPresenceProvider

Detailed Description

The CsPresenceProvider cmdlets are used to manage the PresenceProviders property found in the User Services configuration settings. Among other things, these settings are used to maintain presence information, including a collection of authorized presence providers. That collection is stored in the PresenceProviders property.

The Remove-CsPresenceProvider cmdlet enables you to remove a presence provider from the PresenceProviders property of one or more collections of User Services configuration settings.

To return a list of all the role-based access control (RBAC) roles this cmdlet has been assigned to (including any custom RBAC roles you have created yourself), run the following command from the Windows PowerShell command-line interface prompt:

Get-CsAdminRole | Where-Object {$_.Cmdlets –match "Remove-CsPresenceProvider"}

Lync Server Control Panel: The functions carried out by the Remove-CsPresenceProvider cmdlet are not available in the Lync Server Control Panel.

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Rtc.Management.Xds.XdsIdentity

Unique identifier of the presence provider to be removed. To remove a single provider, use the actual Identity of the provider, which includes both the scope and the provider Fqdn:

-Identity "global/fabrikam.com"

To remove all the presence providers configured at a particular scope, simply use the scope as the Identity. This syntax removes all the providers configured at the global scope:

-Identity "global"

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command.

Force

Optional

System.Management.Automation.SwitchParameter

Suppresses the display of any non-fatal error message that might occur when running the command.

WhatIf

Optional

System.Management.Automation.SwitchParameter

Describes what would happen if you executed the command without actually executing the command.

Input Types

The Remove-CsPresenceProvider cmdlet accepts pipelined instances of the Microsoft.Rtc.Management.WritableConfig.Settings.UserServices.PresenceProvider#Decorated object.

Return Types

None. Instead, the Remove-CsPresenceProvider cmdlet deletes instances of the Microsoft.Rtc.Management.WritableConfig.Settings.UserServices.PresenceProvider#Decorated object.

See Also