我正在尝试使用此函数Get-VSBSession来获取 SureBackup 中失败 VM 的错误消息。
这是我的脚本:
$vbrsessions = Get-VSBSession | ?{$_.result -ne "success"}
foreach ($session in $vbrsessions)
{
foreach ($failedVM in $session.GetTaskSessionsByResult(("failed")))
{
Write-Host "Job Name:" $failedVM.JobName
Write-Host "Status:" $FailedVM.Info.Result
Write-Host "VM:" $failedVM.Name
Write-Host "Error:" ???
}
}
获取错误消息的命令是什么?
谢谢