Use
Connect-VMNetworkAdapter -vmname <VMName> -Name <NetworkAdapterName> -switchname <Switchname>
So for a VM called test with a NIC called NIC1 connecting to ExternalNetwork
Connect-VMNetworkAdapter -vmname test -Name NIC1 -switchname ExternalNetwork
If you don’t know the name of the network adapter use;
Get-VMNetworkAdapter -vmname test
to get a list of adapters for that VM