This cmdlet creates a new virtual switch on the host that is specified by the VMHost parameter.
||Specifies a name for the new virtual switch.||required||
||Specifies the host on which you want to create the new virtual switch.||optional||
||Specifies the virtual switch port number. The value is rounded to the closest exact power of two that is greater than the given number (for example, if the user specifies 67, this number is rounded to 128). Note that the port number displayed in the vSphere Client might differ from the value that you specified for the NumPorts parameter.||optional||
||Specifies the physical network interface cards you want to add to the Active NICs of the new virtual switch. This parameter accepts both objects and strings.||optional||
||Specifies the maximum transmission unit (MTU) associated with the specified virtual switch (in bytes). The MTU value is always greater than 0.||optional||
||Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.|
Creates a new virtual switch named VSwitch on the virtual machine host with IP address 10.23.112.234.
Creates a new virtual switch named VSwitch on the virtual machine host with IP address 10.23.112.234 with a physical network adapter.
Create a virtual switch named VSwitch with two physical network adapters - 'vmnic5' and 'vmnic6'. Note that the 'vmnic5' and 'vmnic6' adapters must not be assigned to other virtual switches.