I can't change a VM backup schedule
Hi,
I am trying to automate a VM backup configuration and have to change a backup schedule.
$schedulePolicy = Get-AzureRmRecoveryServicesBackupSchedulePolicyObject -WorkloadType "AzureVM"
$schedulePolicy.ScheduleRunTimes.RemoveAll()
The RemoveAll() method returns something like Impossible to find an overload for "RemoveAll" and quantity of arguments: "0". So I can't delete a default schedule.
I was able to delete a default schedule this way:
$schedulePolicy.ScheduleRunTimes.Remove($schedulePolicy.ScheduleRunTimes[0])
@dragonfly91 @pragrawa @mkherani can you take a look, and assign to the appropriate milestone if you decide to fix?
Hi
Did you find a solution to your problem?
kind regards
Asger
@IvanovOleg please use $schedulePolicy.ScheduleRunTimes.Clear() to delete default schedule.