Undo-AzKeyVaultManagedHsmRemoval
Recover a managed HSM.
Syntax
Undo-AzKeyVaultManagedHsmRemoval
[-Name] <String>
[-ResourceGroupName] <String>
[-Location] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-SubscriptionId <String>]
[<CommonParameters>]
Undo-AzKeyVaultManagedHsmRemoval
[-InputObject] <PSDeletedManagedHsm>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-SubscriptionId <String>]
[<CommonParameters>]
Description
Recover a previously deleted HSM for which soft delete was enabled.
Examples
Example 1: Recover a deleted HSM
Undo-AzKeyVaultManagedHsmRemoval -Name test001 -ResourceGroupName test-rg -Location westus
Name Resource Group Name Location SKU ProvisioningState
---- ------------------- -------- --- -----------------
test001 test-rg West US StandardB1 Succeeded
This command recovers a managed HSM called test001
from deleted state.
Example 2: Recover a deleted HSM by piping
Get-AzKeyVaultManagedHsm -Name test001 -Location westus -InRemovedState | Undo-AzKeyVaultManagedHsmRemoval
Name Resource Group Name Location SKU ProvisioningState
---- ------------------- -------- --- -----------------
test001 test-rg West US StandardB1 Succeeded
This command recovers a managed HSM called test001
from deleted state by piping.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Deleted HSM object
Type: | PSDeletedManagedHsm |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Location
Specifies the deleted HSM original Azure region.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
HSM name. Cmdlet constructs the FQDN of a managed HSM based on the name and currently selected environment.
Type: | String |
Aliases: | HsmName |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Specifies the name of the deleted HSM resource group.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
The ID of the subscription.
By default, cmdlets are executed in the subscription that is set in the current context. If the user specifies another subscription, the current cmdlet is executed in the subscription specified by the user.
Overriding subscriptions only take effect during the lifecycle of the current cmdlet. It does not change the subscription in the context, and does not affect subsequent cmdlets.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
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: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Outputs
Related Links
Azure PowerShell