VMware {code} Community
admin
Immortal
Immortal
Jump to solution

See what Networks the VM is connected to

Hello,

Have a quick question;

When using VMware SDK, I am able to locate and work with VMs. Most of the information I need can be accessed through the VirtualMachineConfigInfo class.

My problem is, if I want to see what networks the Virtual Machine is connected to, what can I do?? Is there a quick and easy way??

Thanks in advance for any suggestions.

All the best.

0 Kudos
1 Solution

Accepted Solutions
halr9000
Commander
Commander
Jump to solution

I've posted a PowerShell answer to this question is in the VI Toolkit forum:

You can grab the VI Toolkit at http://vmware.com/go/powershell

Hal Rottenberg

Co-Host, PowerScripting Podcast (http://powerscripting.net)

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000

View solution in original post

0 Kudos
2 Replies
halr9000
Commander
Commander
Jump to solution

I've posted a PowerShell answer to this question is in the VI Toolkit forum:

You can grab the VI Toolkit at http://vmware.com/go/powershell

Hal Rottenberg

Co-Host, PowerScripting Podcast (http://powerscripting.net)

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000
0 Kudos
admin
Immortal
Immortal
Jump to solution

On the mor of vm, you can traverse to it's network property. This provides an array of managed object references to the network[] used by the vm, concerned. Traversing through this array, the name property of each network from this list, will provide you the name of the networks to which this vm is connected.

0 Kudos