You can retrieve information about virtual switches by using ESXCLI or vicfg-vswitch.