Get-AzureRmBackupContainer

Gets Backup containers.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

Get-AzureRmBackupContainer
   [-Name <String>]
   -Type <AzureBackupContainerType>
   [-ManagedResourceGroupName <String>]
   [-Status <AzureBackupContainerRegistrationStatus>]
   [-Vault] <AzureRMBackupVault>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzureRmBackupContainer cmdlet gets Azure Backup containers. An AzureBackupContainer encapsulates data sources, protected items, and recovery points. An AzureBackupContainer can be one of the following:

  • A Windows Server computer
  • A System Center Data Protection Manager (SCDPM) server
  • An Azure infrastructure as a service (IaaS) virtual machine Before Backup can back up a data source or item, you must register the container that holds it with the Azure Backup service. The container must be authenticated to send backup data to the Backup vault. For Windows Server computers and SCDPM servers, the registration is held with the fully qualified domain name of the server.

Examples

Example 1: View all servers registered to a vault

PS C:\>$Vault = Get-AzureRmBackupVault -Name "Vault03"
PS C:\> Get-AzureRmBackupContainer -Vault $Vault -Type Windows
Name                         Type               Status
----                         ----               ------
SERVER01.CONTOSO.COM          Windows            Registered
SERVER02.CONTOSO.COM          Windows            Registered

The first command gets the vault named Vault03 by using the Get-AzureRmBackupVault cmdlet. The command stores that object in the $Vault variable. The second command gets all containers of type Windows from the vault in $Vault.

Example 2: Get a specific container

PS C:\>Get-AzureRmBackupContainer -Vault $Vault -Type SCDPM -Name "DPMSERVER.CONTOSO.COM"
Name                         Type               Status
----                         ----               ------
DPMSERVER.CONTOSO.COM        SCDPM              Registered

This command gets the container named DPMSERVER.CONTOSO.COM. The command specifies the vault in $Vault and the type of container.

Example 3: View all registered Azure virtual machines

PS C:\>Get-AzureRmBackupContainer -Vault $Vault -Type AzureVM -Status Registered 
Name                         Type               Status
----                         ----               ------
co03-vm                      AzureVM            Registered

This command gets the registered virtual machines from the vault in $Vault.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ManagedResourceGroupName

Specifies the name of the resource group associated with the container. This name is the same value that you specified for the ServiceName or ResourceGroupName parameter of the Register-AzureRmBackupContainer cmdlet.

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

-Name

Specifies the name of the container that this cmdlet gets.

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

-Status

Specifies the current status of the containers that this cmdlet gets. The acceptable values for this parameter are:

  • NotRegistered
  • Registered
  • Registering
Type:AzureBackupContainerRegistrationStatus
Accepted values:Registered, Registering, NotRegistered
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Type

Specifies the type of containers that this cmdlet gets.

Type:AzureBackupContainerType
Accepted values:Windows, SCDPM, AzureVM, AzureBackupServer, Other
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Vault

Specifies a Backup vault from which this cmdlet gets containers. To obtain an AzureRmBackupVault, use the Get-AzureRmBackupVault cmdlet.

Type:AzureRMBackupVault
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

AzureRMBackupVault

Parameters: Vault (ByValue)

Outputs

AzureRMBackupContainer

Notes

  • None