Azure / Azure/azure-powershell

Get-AzRecoveryServicesBackupProtectionPolicy

Open
#18,787 5 comments 0 reactions 0 assignees View on GitHub
act-observability-squad bug customer-reported Recovery Services Backup Service Attention
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.