Get-​Azure​Rm​Recovery​Services​Backup​Item

Gets the items from a container in Backup.

Syntax

Get-AzureRmRecoveryServicesBackupItem
   [-BackupManagementType] <BackupManagementType>
   [[-Name] <String>]
   [[-ProtectionStatus] <ItemProtectionStatus>]
   [[-ProtectionState] <ItemProtectionState>]
   [-WorkloadType] <WorkloadType>
   [<CommonParameters>]
Get-AzureRmRecoveryServicesBackupItem
   [-Container] <ContainerBase>
   [[-Name] <String>]
   [[-ProtectionStatus] <ItemProtectionStatus>]
   [[-ProtectionState] <ItemProtectionState>]
   [-WorkloadType] <WorkloadType>
   [<CommonParameters>]

Description

The Get-AzureRmRecoveryServicesBackupItem cmdlet gets the items in a container or a value in Azure Backup and the protection status of the items.

A container that is registered to an Azure Recovery Services vault can have one or more items that can be protected. For Azure virtual machines, there can be only one backup item in the virtual machine container.

Set the vault context by using the Set-AzureRmRecoveryServicesVaultContext cmdlet before you use the current cmdlet.

Examples

Example 1: Get an item from a Backup container

PS C:\>$Container = Get-AzureRmRecoveryServicesBackupContainer -ContainerType AzureVM -Status Registered -Name "V2VM"
PS C:\> $BackupItem = Get-AzureRmRecoveryServicesBackupItem -Container $Container -WorkloadType AzureVM

The first command gets the container of type AzureVM, and then stores it in the $Container variable.

The second command gets the Backup item named V2VM in $Container, and then stores it in the $BackupItem variable.

Required Parameters

-BackupManagementType

Specifies the Backup management type. The acceptable values for this parameter are:

  • AzureVM
  • MARS
  • SCDPM
  • AzureBackupServer AzureSQL
Type:BackupManagementType
Parameter Sets:AzureVM, MARS, SCDPM, AzureBackupServer, AzureSQL
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Container

Specifies a container object from which this cmdlet gets backup items. To obtain an AzureRmRecoveryServicesBackupContainer, use the Get-AzureRmRecoveryServicesBackupContainer cmdlet.

Type:ContainerBase
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-WorkloadType

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

  • AzureVM
  • AzureSQLDatabase
Type:WorkloadType
Parameter Sets:AzureVM, AzureSQLDatabase
Position:5
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Name

Specifies the name of the container.

Type:String
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ProtectionState

Specifies the state of protection. The acceptable values for this parameter are:

  • IRPending. Initial synchronization has not started and there is no recovery point yet.
  • Protected. Protection is ongoing.
  • ProtectionError. There is a protection error.
  • ProtectionStopped. Protection is disabled.
Type:ItemProtectionState
Parameter Sets:IRPending, ProtectionError, Protected, ProtectionStopped
Position:4
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ProtectionStatus

Specifies the overall protection status of an item in the container. The acceptable values for this parameter are:

  • Healthy
  • Unhealthy
Type:ItemProtectionStatus
Parameter Sets:Healthy, Unhealthy
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False