Edit

Share via


Get-AzRecoveryServicesBackupContainer

Gets Backup containers.

Syntax

Default (Default)

Get-AzRecoveryServicesBackupContainer
    [-ContainerType] <ContainerType>
    [[-BackupManagementType] <String>]
    [[-FriendlyName] <String>]
    [[-ResourceGroupName] <String>]
    [-VaultId <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Get-AzRecoveryServicesBackupContainer cmdlet gets a backup container. A Backup container encapsulates data sources that are modelled as backup items. For Container type "Azure VM" , the output lists all the containers whose name exactly matches to the one passed as the value for Friendly Name parameter. For other container types, output gives a list of containers with name similar to the value passed for Friendly name parameter. Set the vault context by using the -VaultId parameter.

Examples

Example 1: Get a specific container

$vault = Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
Get-AzRecoveryServicesBackupContainer -ContainerType "AzureVM" -FriendlyName "V2VM" -VaultId $vault.ID

This command gets the container named V2VM of type AzureVM.

Example 2: Get all containers of a specific type

$vault = Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
Get-AzRecoveryServicesBackupContainer -ContainerType Windows -BackupManagementType MAB -VaultId $vault.ID

This command gets all Windows containers that are protected by Azure Backup agent. The BackupManagementType parameter is only required for Windows containers.

Parameters

-BackupManagementType

The class of resources being protected. The acceptable values for this parameter are:

  • AzureVM
  • MAB
  • AzureWorkload
  • AzureStorage

This parameter is used to differentiate Windows machines that are backed up using MARS agent or other backup engines.

Parameter properties

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

Parameter sets

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

-ContainerType

Specifies the backup container type. The acceptable values for this parameter are:

  • AzureVM
  • Windows
  • AzureStorage
  • AzureVMAppContainer

Parameter properties

Type:ContainerType
Default value:None
Accepted values:AzureVM, Windows, AzureStorage, AzureVMAppContainer
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

-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

-FriendlyName

Specifies the friendly name of the container to get.

Parameter properties

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

Parameter sets

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

-ResourceGroupName

Specifies the name of the resource group. This parameter is for Azure virtual machines only.

Parameter properties

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

Parameter sets

(All)
Position:4
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

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

String

Outputs

ContainerBase