Undo-​Azs​Deleted​Storage​Account

Tries to recover a deleted storage account.

Syntax

Undo-AzsDeletedStorageAccount
    -AccountId <String>
    [-Confirm]
    [-NewAccountName <String>]
    [-ResourceAdminApiVersion <String>]
    [-SkipCertificateValidation]
    [-StorageAccountApiVersion <String>]
    [-WhatIf]
    [<CommonParameters>]

Description

The Undo-AzsDeletedStorageAccount cmdlet tries to recover a deleted storage account. The cloud administrator can use this cmdlet to recover a storage account deleted by a user.

Examples

Example 1

$DeletedStorageAccounts = Get-AzsStorageAccount -StorageAccountStatus Deleted 

$AccountIdToRecover = foreach ($StorageAccount in $DeletedStorageAccounts) { if($StorageAccount.StorageAccountName.Equals("teststo")) {$StorageAccount.AccountId} }

Undo-AzsDeletedStorageAccount -AccountId $AccountIdToRecover

Required Parameters

-AccountId

Specifies the account ID in which this cmdlet recovers the storage account.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NewAccountName

Specifies the new account name of the storage account.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceAdminApiVersion

API version of the Resource.Admin namespace.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SkipCertificateValidation

Indicates that the cmdlet does not validate the certificate.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StorageAccountApiVersion

Specifies the API version of the storage account for which this cmdlet recovers.

Type:String
Position:Named
Default value:None
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
Accept pipeline input:False
Accept wildcard characters:False