Hello
I try to use the VirtualMachine.PowerOnVM_Task which returns a reference to the Managed Object - Task as ManagedObject Reference. (The VirtualMachine is the result of the get-view)
I use it in VB:
Dim refTask As Vim.ManagedObjectReference = Vim_VirtualMachine.PowerOnVM_Task(Vim_VirtualMachine.Runtime.Host)
I can get the reftask as ManagementObjectReference but from here I'm not sure how to convert it to the Managed Object - Task. I like to use all the properties and methodes of this Object.
Looking at my result of the refTask I don't find many properties......
Is it somhow possible to retrieve right object to have the reference to the taskobject.
Regards
Manfred
Hi,
You can get managed object from it's Moref either using Get-View cmdlet or in VB using VimClient.GetView method i.e:
Get-View -Id refTask
or
Dim task As Vim.Task = Vim_VirtualMachine.Client.GetView(refTask)
Note that each MO has Client property that is of VimClient type.
Regards,
Yasen
Hi,
You can get managed object from it's Moref either using Get-View cmdlet or in VB using VimClient.GetView method i.e:
Get-View -Id refTask
or
Dim task As Vim.Task = Vim_VirtualMachine.Client.GetView(refTask)
Note that each MO has Client property that is of VimClient type.
Regards,
Yasen
Hello Yasen
Great!
Thank you for the answer it solved my problem.
Regards
Manfred