編集

次の方法で共有


Undo-AzRecoveryServicesBackupContainerDeletion

Undeletes a previously soft-deleted backup container in a recovery services vault.

Syntax

Default (Default)

Undo-AzRecoveryServicesBackupContainerDeletion
    [-Container] <ContainerBase>
    [-BackupManagementType] <BackupManagementType>
    [-WorkloadType] <WorkloadType>
    [-Force]
    [-VaultId <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Undo-AzRecoveryServicesBackupContainerDeletion cmdlet restores a soft-deleted container to a state where it is no longer marked for deferred deletion and is ready for re-registration.

Examples

Example 1

$container = Get-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultId $vault.ID -BackupManagementType AzureWorkload -ContainerType AzureVMAppContainer | Where-Object { $_.Name -match $containerName}
Undo-AzRecoveryServicesBackupContainerDeletion -Container $container[0] -BackupManagementType AzureWorkload -WorkloadType MSSQL -VaultId $vault.ID -Force -Confirm:$false
Name											ResourceGroupName        Status               ContainerType        WorkloadsPresent     HealthStatus
----											-----------------        ------               -------------        ----------------     ------------
VMAppContainer;Compute;rgname;contianerName		rgname                   SoftDeleted          AzureVMAppContainer  SQL                  Healthy

This example retrieves a backup container named $containerName from a specified resource group and vault, and then undeletes the soft-deleted container for an MSSQL workload. The -Force parameter is used to bypass the confirmation prompt, and -Confirm:$false ensures the cmdlet runs without additional confirmation.

Parameters

-BackupManagementType

The class of resources being protected. Currently the values supported for this cmdlet are

Parameter properties

Type:BackupManagementType
Default value:None
Accepted values:AzureVM, AzureWorkload, AzureStorage
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

-Container

Container where the item resides

Parameter properties

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

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
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

-Force

Force registers container (prevents confirmation dialog). This parameter is optional.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VaultId

ARM ID of the Recovery Services Vault.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
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

-WorkloadType

Workload type of the resource. The current supported values are

Parameter properties

Type:WorkloadType
Default value:None
Accepted values:AzureVM, AzureFiles, MSSQL, SAPHanaDatabase
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
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.

Inputs

ContainerBase

String

Outputs

ContainerBase