Get-AzureRmRecoveryServicesBackupContainer
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-AzureRmRecoveryServicesBackupContainer
[-ContainerType] <ContainerType>
[[-BackupManagementType] <String>]
[[-Name] <String>]
[[-FriendlyName] <String>]
[[-ResourceGroupName] <String>]
[[-Status] <ContainerRegistrationStatus>]
[-VaultId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzureRmRecoveryServicesBackupContainer cmdlet gets a backup container. A Backup container encapsulates data sources that are modelled as backup items. Set the vault context by using the Set-AzureRmRecoveryServicesVaultContext cmdlet before you use the current cmdlet.
Examples
Example 1: Get a specific container
PS C:\>Get-AzureRmRecoveryServicesContainer -ContainerType "AzureVM" -Status "Registered" -Name "V2VM";
This command gets the container named V2VM of type AzureVM.
Example 2: Get all containers of a specific type
PS C:\>Get-AzureRmRecoveryServicesBackupContainer -ContainerType Windows -BackupManagementType MARS
This command gets all Windows containers that are protected by Azure Backup agent. The BackupManagementType parameter is only required for Windows containers.
Parameters
-BackupManagementType
Specifies the backup management type. The acceptable values for this parameter are:
- AzureVM
- MARS
- AzureSQL
- AzureStorage
This parameter is used to differentiate Windows machines that are backed up using MARS agent or other backup engines.
Type: | String |
Accepted values: | AzureVM, MARS, AzureSQL, AzureStorage |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ContainerType
Specifies the backup container type. The acceptable values for this parameter are:
- AzureVM
- Windows
- AzureSQL
- AzureStorage
Type: | ContainerType |
Accepted values: | AzureVM, Windows, AzureSQL, AzureStorage |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-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 |
-FriendlyName
Specifies the friendly name of the container to get.
Type: | String |
Position: | 3 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies the name of the container to get.
Type: | String |
Position: | 3 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Specifies the name of the resource group. This parameter is for Azure virtual machines only.
Type: | String |
Position: | 4 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Status
Specifies the container registration status. The acceptable values for this parameter are:
- Registered
Type: | ContainerRegistrationStatus |
Accepted values: | Registered |
Position: | 5 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VaultId
ARM ID of the Recovery Services Vault.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
Parameters: VaultId (ByValue)