Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Undo-AzKeyVaultKeyRemoval

Recovers a deleted key in a key vault into an active state.

Syntax

Default (Default)

Undo-AzKeyVaultKeyRemoval
 [-VaultName] <String>
 [-Name] <String>
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

HsmInteractive

Undo-AzKeyVaultKeyRemoval
 [-Name] <String>
 -HsmName <String>
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

InputObject

Undo-AzKeyVaultKeyRemoval
 [-InputObject] <PSDeletedKeyVaultKeyIdentityItem>
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

Description

The Undo-AzKeyVaultKeyRemoval cmdlet will recover a previously deleted key. The recovered key will be active and can be used for all normal key operations. Caller needs to have 'recover' permission in order to perform this operation.

Examples

Example 1

Undo-AzKeyVaultKeyRemoval -VaultName 'MyKeyVault' -Name 'MyKey'
Vault Name : MyKeyVault
Name : MyKey
Version : 1af807cc331a49d0b52b7c75e1b2366e
Id : https://mykeybault.vault.azure.net:443/keys/mykey/1af807cc331a49d0b52b7c75e1b2366e
Enabled : True
Expires :
Not Before :
Created : 5/24/2018 8:32:27 PM
Updated : 5/24/2018 8:32:27 PM
Purge Disabled : False
Tags :

This command will recover the key 'MyKey' 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

-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

-HsmName

HSM name. Cmdlet constructs the FQDN of a managed HSM based on the name and currently selected environment.

Parameter properties

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

Parameter sets

-InputObject

Deleted key object

Parameter properties

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

Parameter sets

-Name

Key name. Cmdlet constructs the FQDN of a key from vault name, currently selected environment and key name.

Parameter properties

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

Parameter sets

-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

-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

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

PSDeletedKeyVaultKeyIdentityItem

Outputs

PSKeyVaultKey

Related Links


Feedback

Was this page helpful?