Remove-HgsKeyProtectionCertificate

Removes a key certificate from the Key Protection Service.

Syntax

Remove-HgsKeyProtectionCertificate
      -CertificateType <KeyCertificateType>
      -Thumbprint <String>
      [-Force]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-HgsKeyProtectionCertificate cmdlet removes a key certificate from the Key Protection Service. If the certificate being removed references a certificate stored in the LocalMachine\My certificate store, this cmdlet does not delete that certificate from the LocalMachine\My certificate store.

Examples

Example 1: Remove an encryption certificate

PS C:\> Remove-HgsKeyProtectionCertificate -CertificateType Encryption -Thumbprint "d39203a3b3544743ad552afe0615dc1f"

This command removes an encryption certificate from the Key Protection Service.

Parameters

-CertificateType

Specifies of the type of the certificate that this cmdlet removes. The acceptable values for this parameter are:

  • Signing
  • Encryption
Type:KeyCertificateType
Accepted values:Signing, Encryption
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Thumbprint

Specifies the thumbprint of the certificate to remove.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

You cannot pipe input to this cmdlet.

Outputs

None

This cmdlet does not generate any output.