You just need to use the VirtualVmxnet3 network card type. In this example, I'm preserving an existing MAC address (it's an upgrade nic script from an older VMX type). The backing parameter needs to be your VirtualEthernetCardDistributedVirtualPortBackingInfo or VirtualEthernetCardNetworkBackingInfo objects, depending if you're attaching to a distributed or standard virtual switch portgroup.
The rest of your code should remain the same.
# Perl example -$VirtualEthernetCard = VirtualVmxnet3->new( key => -1,backing => $VirtualDeviceBackingInfo,addressType => 'Manual',macAddress => $mac );