Get-AzRecoveryServicesBackupRecoveryPoint

Gets the recovery points for a backed up item.

Syntax

Get-AzRecoveryServicesBackupRecoveryPoint
   [-Item] <ItemBase>
   [-VaultId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzRecoveryServicesBackupRecoveryPoint
   [[-StartDate] <DateTime>]
   [[-EndDate] <DateTime>]
   [-Item] <ItemBase>
   [-VaultId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzRecoveryServicesBackupRecoveryPoint
   [-Item] <ItemBase>
   [-RecoveryPointId] <String>
   [[-KeyFileDownloadLocation] <String>]
   [-VaultId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzRecoveryServicesBackupRecoveryPoint cmdlet gets the recovery points for a backed up Azure Backup item. After an item has been backed up, an AzureRmRecoveryServicesBackupRecoveryPoint object has one or more recovery points. Set the vault context by using the Set-AzRecoveryServicesVaultContext cmdlet before you use the current cmdlet.

Examples

Example 1: Get recovery points from the last week for an item

PS C:\> $StartDate = (Get-Date).AddDays(-7) 
PS C:\> $EndDate = Get-Date 
PS C:\> $Container = Get-AzRecoveryServicesBackupContainer -ContainerType AzureVM -Status Registered -Name "V2VM"
PS C:\> $BackupItem = Get-AzRecoveryServicesBackupItem -ContainerType AzureVM -WorkloadType AzureVM 
PS C:\> $RP = Get-AzRecoveryServicesBackupRecoveryPoint -Item $BackupItem -StartDate $Startdate.ToUniversalTime() -EndDate $Enddate.ToUniversalTime()

The first command gets the date from seven days ago, and then stores it in the $StartDate variable. The second command gets today's date, and then stores it in the $EndDate variable. The third command gets AzureVM backup containers, and stores them in the $Containers variable. The fourth command gets the backup item named V2VM, and then stores it in the $BackupItem variable. The last command gets an array of recovery points for the item in $BackupItem, and then stores them in the $RP variable.

Parameters

-DefaultProfile

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

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EndDate

Specifies the end of the date range.

Type:System.Nullable`1[System.DateTime]
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Item

Specifies the item for which this cmdlet gets recovery points. To obtain an AzureRmRecoveryServicesBackupItem object, use the Get-AzRecoveryServicesBackupItem cmdlet.

Type:Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.ItemBase
Position:2
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-KeyFileDownloadLocation

Specifies the location to download the input file to restore the KeyVault key for an encrypted virtual machine.

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

Specifies the recovery point ID.

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StartDate

Specifies the start of the date range.

Type:System.Nullable`1[System.DateTime]
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VaultId

ARM ID of the Recovery Services Vault.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Inputs

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

String

Outputs

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