< Back

Get-AzureRmRecoveryServicesBackupItem

Tue Jan 29, 2019 10:00 pm

NAME Get-AzureRmRecoveryServicesBackupItem



SYNOPSIS

Gets the items from a container in Backup.





SYNTAX

Get-AzureRmRecoveryServicesBackupItem [-BackupManagementType] {AzureVM | MARS | SCDPM | AzureBackupServer | AzureSQL} [[-Name] <String>]

[[-ProtectionStatus] {Healthy | Unhealthy}] [[-ProtectionState] {IRPending | ProtectionError | Protected | ProtectionStopped}] [-WorkloadType]

{AzureVM | AzureSQLDatabase} [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]



Get-AzureRmRecoveryServicesBackupItem [-Container] <ContainerBase> [[-Name] <String>] [[-ProtectionStatus] {Healthy | Unhealthy}]

[[-ProtectionState] {IRPending | ProtectionError | Protected | ProtectionStopped}] [-WorkloadType] {AzureVM | AzureSQLDatabase} [-DefaultProfile

<IAzureContextContainer>] [<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.





PARAMETERS

-BackupManagementType <BackupManagementType>

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



- AzureVM



- MARS



- SCDPM



- AzureBackupServer



AzureSQL



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Container <ContainerBase>

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

Get-AzureRmRecoveryServicesBackupContainer cmdlet.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

Specifies the name of the container.



Required? false

Position? 2

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ProtectionState <ItemProtectionState>

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.



Required? false

Position? 4

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ProtectionStatus <ItemProtectionStatus>

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



- Healthy



- Unhealthy



Required? false

Position? 3

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-WorkloadType <WorkloadType>

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



- AzureVM



- AzureSQLDatabase



Required? true

Position? 5

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.ItemBase





System.Collections.Generic.IList`1[Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.ItemBase]







NOTES









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.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... backupitem

Backup-AzureRmRecoveryServicesBackupItem

Disable-AzureRmRecoveryServicesBackupProtection

Get-AzureRmRecoveryServicesBackupRecoveryPoint

Restore-AzureRmRecoveryServicesBackupItem