Get-AzureRmRecoveryServicesBackupRecoveryPoint
Gets the recovery points for a backed up item.
Caution
Because Az PowerShell modules now have all the capabilities of AzureRM PowerShell modules and more, we'll retire AzureRM PowerShell modules on 29 February 2024.
To avoid service interruptions, update your scripts that use AzureRM PowerShell modules to use Az PowerShell modules by 29 February 2024. To automatically update your scripts, follow the quickstart guide.
Syntax
Get-AzureRmRecoveryServicesBackupRecoveryPoint
[-Item] <ItemBase>
[-VaultId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureRmRecoveryServicesBackupRecoveryPoint
[[-StartDate] <DateTime>]
[[-EndDate] <DateTime>]
[-Item] <ItemBase>
[-VaultId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureRmRecoveryServicesBackupRecoveryPoint
[-Item] <ItemBase>
[-RecoveryPointId] <String>
[[-KeyFileDownloadLocation] <String>]
[-VaultId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzureRmRecoveryServicesBackupRecoveryPoint 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-AzureRmRecoveryServicesVaultContext 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-AzureRmRecoveryServicesBackupContainer -ContainerType AzureVM -Status Registered -Name "V2VM"
PS C:\> $BackupItem = Get-AzureRmRecoveryServicesBackupItem -ContainerType AzureVM -WorkloadType AzureVM
PS C:\> $RP = Get-AzureRmRecoveryServicesBackupRecoveryPoint -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: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EndDate
Specifies the end of the date range.
Type: | Nullable<T>[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-AzureRmRecoveryServicesBackupItem cmdlet.
Type: | ItemBase |
Position: | 2 |
Default value: | None |
Accept pipeline input: | True |
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: | Nullable<T>[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 |
Accept wildcard characters: | False |
Inputs
Parameters: Item (ByValue)
Parameters: VaultId (ByValue)