Azure / Azure/azure-powershell
RecoveryPointExpiryTime values are mostly blank in results from Get-AzRecoveryServicesBackupRecoveryPoint
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 51
Description
### Description
When listing all restore points for a VM using the cmdlet Get-AzRecoveryServicesBackupRecoveryPoint, most points have an empty value in the RecoveryPointExpiryTime field, even though the expected expiry times are shown for all restore points when viewing in the portal.
Output from script:
View from portal:
### Issue script & Debug output
```PowerShell
$vault = Get-AzRecoveryServicesVault -Name $vaultName -ResourceGroupName $vaultRG
$container = Get-AzRecoveryServicesBackupContainer -ContainerType AzureVM -VaultId $vault.ID -FriendlyName $serverName -ResourceGroupName $serverRG
$item = Get-AzRecoveryServicesBackupItem -WorkloadType AzureVM -Container $container -VaultId $vault.ID
$restorePoints = Get-AzRecoveryServicesBackupRecoveryPoint -Item $item -StartDate $startDate -EndDate $endDate -VaultId $vault.ID
$restorePoints | select RecoveryPointId, RecoveryPointType, RecoveryPointTime, RecoveryPointExpiryTime, ContainerName, ContainerType | Format-Table -AutoSize
```
### Environment data
```PowerShell
Name Value
---- -----
PSVersion 5.1.22621.6133
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22621.6133
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
```
### Module versions
```PowerShell
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 5.3.0 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault...}
Script 7.8.0 Az.RecoveryServices {Add-AzRecoveryServicesAsrReplicationProtectedItemDisk, Backup-AzRecoveryServicesBackupItem, Copy-AzRecoveryServicesVault, Disable-AzRecoveryServicesBackupAutoProtection...}
```
### Error output
```PowerShell
```
Contributor guide
Assessment
This issue has not been assessed yet.