VMware {code} Community
jonathanp
Expert
Expert

how to get a list of Distributed vSwitch in c#

Hi,

    basically I use the code below (and it works) to get the list of vswitch and would like something like that for dVS....

var vswitches = ((VMware.Vim.HostSystem)(client.FindEntityViews(typeof(HostSystem), null, null, null)[0])).Config.Network.Vswitch;

            foreach (var vswitch in vswitches)

Thanks for your help.

0 Kudos
2 Replies
jonathanp
Expert
Expert

nevermind,

                I figured out Smiley Happy, using the SDK and some c# coding...

0 Kudos
MaheshA9
Contributor
Contributor

Hi ,

Could you please share some code how to get Distributed vSwitch in C#

Thanks in advance

0 Kudos