Using RunningVirtualMachines in VBScript

33 views
Skip to first unread message

Matjaz Rihtar

unread,
Sep 29, 2015, 4:29:38 PM9/29/15
to vmwaretasks
Hi!
How does one use virtualHost.RunningVirtualMachines() in VBScript?
The following code doesn't work (Type mismatch, vm seems to be of type Unknown()):


For Each vm In virtualHost.RunningVirtualMachines()

  WScript.Echo vm.name()

Next


The same question is valid for RegisteredVirtualMachines and FindSnapshotsByName, where arrays of VMWareVirtualMachine and VMWareSnapshot are returned.


Any help appreciated!

Matjaz Rihtar

unread,
Sep 29, 2015, 7:34:56 PM9/29/15
to vmwaretasks

It seems VMWareComLib needs to be modified to able to use this functionality as it's proposed in How to correctly marshal VB-Script arrays to and from a COM component written in C#. Then it works as intended.

Daniel Doubrovkine

unread,
Sep 30, 2015, 6:56:12 AM9/30/15
to vmwar...@googlegroups.com
Yes, that seems right. Please do open an issue, and appreciate any PRs!

On Tue, Sep 29, 2015 at 7:34 PM, Matjaz Rihtar <mri...@gmail.com> wrote:

It seems VMWareComLib needs to be modified to able to use this functionality as it's proposed in How to correctly marshal VB-Script arrays to and from a COM component written in C#. Then it works as intended.

--
You received this message because you are subscribed to the Google Groups "vmwaretasks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmwaretasks...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages