You can check, add, and remove port groups with ESXCLI and with vicfg-vswitch