问题描述
我正在尝试通过Powershell生成前一天的备份报告,但是它不起作用。有人可以帮我吗? 以下是我的Powershell脚本
$ErrorActionPreference = "SilentlyContinue"
$report_object =$null
$report_object = @()
$vms = get-azvm | select Name
$acs = Get-AzRecoveryServicesVault
foreach ($ac in $acs){
Set-AzRecoveryServicesVaultContext -Vault $ac
$container_list = Get-AzRecoveryServicesBackupContainer -ContainerType AzureVM
foreach($container_list_iterator in $container_list){
$backup_item = Get-AzRecoveryServicesBackupItem -Container $container_list_iterator -WorkloadType AzureVM