Undo-AzKeyVaultCertificateRemoval
Recovers a deleted certificate in a key vault into an active state.
Syntax
Default (Default)
Undo-AzKeyVaultCertificateRemoval
[-VaultName] <String>
[-Name] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Undo-AzKeyVaultCertificateRemoval
[-InputObject] <PSDeletedKeyVaultCertificateIdentityItem>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Undo-AzKeyVaultCertificateRemoval cmdlet will recover a previously deleted certificate.
The recovered certificate will be active and can be used for all operations.
Caller needs to have 'recover' permission in order to perform this operation.
Examples
Example 1
Undo-AzKeyVaultCertificateRemoval -VaultName 'MyKeyVault' -Name 'MyCertificate'
Certificate : [Subject]
CN=contoso.com
[Issuer]
CN=contoso.com
[Serial Number]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Not Before]
5/24/2018 10:58:13 AM
[Not After]
11/24/2018 10:08:13 AM
[Thumbprint]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
KeyId : https://mykeyvault.vault.azure.net:443/keys/mycertificate/7fe415d5518240c1a6fce89986b8d334
SecretId : https://mykeyvault.vault.azure.net:443/secrets/mycertificate/7fe415d5518240c1a6fce89986b8d334
Thumbprint : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
RecoveryLevel : Recoverable+Purgeable
Enabled : True
Expires : 11/24/2018 6:08:13 PM
NotBefore : 5/24/2018 5:58:13 PM
Created : 5/24/2018 6:08:13 PM
Updated : 5/24/2018 6:08:13 PM
Tags :
VaultName : MyKeyVault
Name : MyCertificate
Version : 7fe415d5518240c1a6fce89986b8d334
Id : https://mykeyvault.vault.azure.net:443/certificates/mycertificate/7fe415d5518240c1a6fce89986b8d334
This command will recover the certificate 'MyCertificate' that was previously deleted, into an active and usable state.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
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
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Deleted Certificate object
InputObject
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
Certificate name.
Cmdlet constructs the FQDN of a certificate from vault name, currently selected environment and certificate name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: CertificateName
Parameter sets
Default
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-VaultName
Vault name.
Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Default
Position: 0
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: None
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 .
Outputs