Remove-CsCertificate

Removes a certificate previously marked as being available for use by Skype for Business Server. This cmdlet was introduced in Lync Server 2010.

Syntax

Remove-CsCertificate
      [-Type <CertType[]>]
      [-NetportId <String>]
      [-Force]
      [-Report <String>]
      [-WhatIf]
      [-Confirm]
      [[-Identity] <XdsIdentity>]
      [-Previous]
      [<CommonParameters>]

Description

Skype for Business Server uses certificates as a way for servers and server roles to verify their identities; for example, an Edge Server uses certificates to verify that the computer it is communicating with really is a Front End Server and vice versa. In order to fully implement Skype for Business Server, you will need to have the appropriate certificates assigned to the appropriate server roles.

The Remove-CsCertificate cmdlet provides a way for you to remove certificates currently in use by Skype for Business Server. The Remove-CsCertificate cmdlet does not actually delete the certificate itself; instead, it marks the certificate as no longer being available for use by Skype for Business Server, removes any certificate bindings and revokes access permissions to the certificate (assuming no other service is using the certificate). Among other things, this means that the certificate will no longer appear when you run the Get-CsCertificate cmdlet.

To again use the certificate with Skype for Business Server you will need to reassign the certificate to Skype for Business Server by using the Set-CsCertificate cmdlet.

If you try to remove a certificate that is currently in use, the Remove-CsCertificate cmdlet will be ask if you are sure that you want to remove the certificate; the certificate cannot be removed until you respond to that prompt. To bypass the prompt and silently delete a certificate even if it is currently in use, add the Force parameter to your command:

Remove-CsCertificate -Type WebServicesExternal -Force

Examples

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

Remove-CsCertificate -Type WebServicesExternal

The command shown in Example 1 deletes all the WebServicesExternal certificates available to Skype for Business Server. If any of these certificates are currently being used, the Remove-CsCertificate cmdlet will ask you if you are sure you want to remove the certificate; you must respond to that prompt before the command can complete. To bypass the confirmation prompt, use the Force parameter:

Remove-CsCertificate -Type WebServicesExternal -Force

Parameters

-Confirm

Prompts you for confirmation before executing the command.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Force

Bypasses the confirmation prompt that typically occurs if you attempt to delete a certificate that is currently in use.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Identity

When set to Global, removes the certificate from the global scope. When not specified, certificates are removed from the local computer.

Type:XdsIdentity
Position:2
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-NetportId

Reserved for future use. This parameter is for certificates dedicated to a specific port, a scenario not yet supported by Lync Server.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010

-Previous

When specified, removes the previously-assigned certificate instead of the currently-assigned certificate.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Report

Enables you to record detailed information about the procedures carried out by the Remove-CsCertificate cmdlet. The parameter value should be the full path to the HTML file to be generated; for example: -Report C:\Logs\Certificates.html. If the specified file already exists it will automatically be overwritten with the new information.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Type

Type of certificate to be deleted. Certificate types include (but are not limited to):

  • AccessEdgeExternal

  • AudioVideoAuthentication

  • DataEdgeExternal

  • Default

  • External

  • Internal

  • PICWebService (Skype for Business Online only)

  • ProvisionService (Skype for Business Online only)

  • WebServicesExternal

  • WebServicesInternal

  • WsFedTokenTransfer

For example, this syntax deletes the Default certificate: -Type Default.

You can delete multiple types in a single command by separating the certificate types with commas:

-Type Internal,External,Default

Type:CertType[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Inputs

None. The Remove-CsCertificate cmdlet does not accept pipelined input.

Outputs

None. Instead, the Remove-CsCertificate cmdlet deletes instances of the Microsoft.Rtc.Management.Deployment.CertificateReference object.