I’m working on triggering an on-demand backup for my machines. But while running ps script it shows the below error. "Cannot validate argument on parameter 'Container'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again".
$vault = Get-AzRecoveryServicesVault -ResourceGroupName "xxxx" -Name "xxxx"
Set-AzRecoveryServicesVaultContext -Vault $vault
$backupcontainer = Get-AzRecoveryServicesBackupContainer -ContainerType "AzureVM" -FriendlyName "testvm"
$item = Get-AzRecoveryServicesBackupItem -Container $backupcontainer -WorkloadType "AzureVM"
the above code was working fine couple of months ago. I have tried using different vm names in -FriendlyName but no luck.
Please suggest