Use the following:

esxcfg-vswitch -A "Port Group Name" vSwitch2 && esxcfg-vswitch -v N -p "Port Group Name" vSwitch2

Where N is the VLAN tag.