Undo-AzKeyVaultManagedStorageAccountRemoval
Recovers a previously deleted KeyVault-managed storage account.
Syntax
Undo-AzKeyVaultManagedStorageAccountRemoval
[-VaultName] <String>
[-Name] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Undo-AzKeyVaultManagedStorageAccountRemoval
[-InputObject] <PSDeletedKeyVaultManagedStorageAccountIdentityItem>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Undo-AzKeyVaultManagedStorageAccountRemoval command recovers a previously deleted managed storage account, provided that soft delete is enabled for this vault, and that the attempt to recover occurs during the recovery interval.
Examples
Example 1
Get-AzKeyVaultManagedStorageAccount -VaultName myVault -Name myAccount -InRemovedState
Undo-AzKeyVaultManagedStorageAccountRemoval -VaultName myVault -Name myAccount
Id : https://myvault.vault.azure.net:443/storage/myaccount
Vault Name : myVault
AccountName : myAccount
Account Resource Id : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/myrg/providers/Microsoft.St
orage/storageAccounts/myaccount
Active Key Name : key2
Auto Regenerate Key : False
Regeneration Period : 90.00:00:00
Enabled : True
Created : 4/25/2018 1:50:32 AM
Updated : 4/25/2018 1:50:32 AM
Tags :
This sequence of commands determines whether the specified storage account exists in the vault in a deleted state; the subsequent command recovers the deleted storage account, bringing it back into an active state.
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 Managed Storage Account object
Type: | PSDeletedKeyVaultManagedStorageAccountIdentityItem |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Name of the KeyVault managed storage account. Cmdlet constructs the FQDN of the target from vault name, currently selected environment and the name of the managed storage account.
Type: | String |
Aliases: | StorageAccountName |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.
Type: | String |
Position: | 0 |
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: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
PSDeletedKeyVaultManagedStorageAccountIdentityItem