Not able to set 'BackupStorageRedundancy' to "ZoneRedundant" using Set-AzRecoveryServicesBackupProperty command

MONDALABDULKADIR-7547 25 Reputation points
2024-02-06T07:02:57.9966667+00:00

Hello , We have one script wich is used to create a Recovery Service Vault using the below commands. Which warking properly. $VaultToUse = New-AzRecoveryServicesVault -ResourceGroupName $rgName -Name $rsvName -Location $location Set-AzRecoveryServicesBackupProperty -Vault $VaultToUse -BackupStorageRedundancy 'ZoneRedundant' However, since last few days back the above commands failed with below error:- Error:-

Set-AzRecoveryServicesBackupProperty : Cannot bind parameter 'BackupStorageRedundancy'. Cannot convert value "ZoneRedundant" to type 
"Microsoft.Azure.Commands.RecoveryServices.AzureRmRecoveryServicesBackupStorageRedundancyType". Error: "Unable to match the identifier name ZoneRedundant to a valid 
enumerator name. Specify one of the following enumerator names and try again:
GeoRedundant, LocallyRedundant"
At line:1 char:82
+ ... pProperty -Vault $VaultToUse -BackupStorageRedundancy 'ZoneRedundant'
+                                                           ~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Set-AzRecoveryServicesBackupProperty], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.Azure.Commands.RecoveryServices.SetAzureRmRecoveryServicesBackupProperties

But again the same command works if we change the BackupStorageRedundancy 'GeoRedundant' but the same does not work for "ZoneRedundant". Can someone please help to if we can set the property value to 'ZoneRedundant'.

Azure Backup
Azure Backup
An Azure backup service that provides built-in management at scale.
1,079 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
6,839 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
1,868 questions
{count} votes

Accepted answer
  1. Stanislav Zhelyazkov 19,276 Reputation points MVP
    2024-02-06T07:18:54.76+00:00

    Have you done any changes? If you have updated the Az PowerShell modules I would suggest to revert to the previous version that was working and log a bug in Azure PowerShell GitHub repository.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. MONDALABDULKADIR-7547 25 Reputation points
    2024-02-09T06:38:58.9366667+00:00

    The issue was with the Az PowerShell module. I tried in Az 11.3.0 version, which is the latest as of now. When I tried the same command with Az 10.4.3 , it executed correctly.