Azure / Azure/azure-powershell
Get-AzRecoveryServicesBackupProtectionPolicy
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 51
Description
### Description
Using v5.4 Az.RecoveryServices module
Get-AzRecoveryServicesBackupProtectionPolicy
FullBackupRetentionPolicy.MonthlySchedule.RetentionScheduleType nor FullBackupRetentionPolicy.YearlySchedule.RetentionScheduleType cannot be expressed programmatically with PowerShell even though it has a value.
As in the following;
$VaultPoliciesList.FullBackupRetentionPolicy.MonthlySchedule.RetentionScheduleType
-or
$VaultPoliciesList.FullBackupRetentionPolicy.YearlySchedule.RetentionScheduleType
All other properties seem to return values
### Issue script & Debug output
```PowerShell
None errors out as null when when called- System.Management.Automation.RuntimeException
Cannot index into a null array.
```
### Environment data
```PowerShell
Name Value
---- -----
PSVersion 7.2.5
PSEdition Core
GitCommitId 7.2.5
OS Microsoft Windows 10.0.19042
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```
### Module versions
```PowerShell
Using v5.4 Az.RecoveryServices module
```
### Error output
```PowerShell
System.Management.Automation.RuntimeException
Cannot index into a null array.
```
Contributor guide
Assessment
This issue has not been assessed yet.