One very cool feature I want to work with is Veeam's ability to retrieve Guest OS name. I am able to get that information when querying a job's object and if the vm has gone through one run of its job, but not in any other case.
How can I get the Guest Os Name for any VM?
Like what can be seen from: Inventory > Virtual Infrastructure > Microsoft Hyper-V > Standalone Hosts (click on a host, wait for info: Guest OS column populated)
Using VBR 11 on Standalone Hyper-V Hosts exclusively. VBR v12 soon to be installed.
Code: Select all
# Get all Jobs from my Veeam backup server
$jobs = Get-VBRJob
# For each job gather information to report
$report = foreach ($job in $jobs) {
# For each vm in each backup job
$allMyBackedUpVms = Get-VBRJobObject -Job $job
# For each vm in each backup job get some info
foreach ($backedUpVm in $allMyBackedUpVms) {
$gatherInfo = [PSCustomObject]@{
BackedUpName = $backedUpVm.Name
BackedUpOsName = $backedUpVm.GetObject().GuestInfo.GetGuestOsName()
BackedUpFrom = $backedUpVm.Location
BackUpEstimSize = $backedUpVm.ApproxSizeString
}
# Which job this vm is member of
$gatherInfo | Add-Member -MemberType NoteProperty -Name 'VeeamJobName' -Value $job.Name
$gatherInfo
}
}
# PowerShell view
$report |Out-GridView