Maybe it could be useful to someone else, or you could link people to it.
I have created a test job called "Backup job for Andersgustaf" with two VMs:
- one online (winserver2012_aama)
- one offline (New Virtual Machine1).
The job must run at least once to collect guest OS info. For Hyper-V you don't have to enable application-aware processing, we will get this info anyway. For VMware I haven't tested yet, I will update the post tomorrow accordingly.
The machines must be online and have integration tools installed, so that the host could get guest OS properties via Data Exchange service.
Please replace "YourJobName" with the actual name of the job.
Code: Select all
filter Invoke-Method {
param(
[String]$Method,
[Object[]]$ArgumentList
)
$_.GetType().InvokeMember(
$Method.Trim(),
([System.Reflection.BindingFlags]'InvokeMethod'),
$null,
$_,
$ArgumentList
)
}
clear
add-pssnapin Veeampssnapin
$job = get-vbrjob -name "YourJobName"
$vms = Get-VBRJobObject -job $job
foreach ($vm in $vms) {
$dnsname = $vm.object.info.guestinfo | Invoke-Method FindDnsName
$name = $vm.object.name
write-host "Object in job: $name, DNS name: $dnsname"
}