Edit

Share via


Remove-HgsKeyProtectionCertificate

Removes a key certificate from the Key Protection Service.

Syntax

Default (Default)

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

Parameter properties

Type:KeyCertificateType
Default value:None
Accepted values:Signing, Encryption
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Forces the command to run without asking for user confirmation.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Thumbprint

Specifies the thumbprint of the certificate to remove.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

You cannot pipe input to this cmdlet.

Outputs

None

This cmdlet does not generate any output.