Code: Select all
$VMName = "VM1"
$HyperVHostNAme = "HypV1"
$JobName = "Job1"
$HyperVHost = Get-VBRServer | Where-Object{$_.name -eq $HyperVHostNAme }
$Job = Get-VBRJob | Where-Object{$_.name -eq $JobName}
$HVEntity = Find-VBRHvEntity -Name $VMName
Add-VBRJobObject -Job $Job -Server $HyperVHost -Entities $HVEntity
Add-VBR-JobObject : Cannot bind parameter 'Entities'. Cannot convert the "Veeam.Backup.Core.Infrastructure.CHvVmItem" value of type "Veeam.Backup.Core.Infrastructure.CHvVmItem" to type "Veeam.Backup.ViSoap.Entity"
I have also tried the Add-VBRJobObject command with the -Objects variable instead of -Entities. This looks as though it works and gives no error but does not add the vm to the job.
I can only assume that this is because this cmdlet is wrappered for VMWare and not hyper-v. I cannot see a cmdlet in the guide for adding hyper-v vm's to hyper-v jobs. Does anyone know how?
Support Ref: [ID#5212550]