VLANs on CHR under Hyper-V

# Insert VM into variable
$vm = Get-VM -Name Mikrotik
 
# Insert VMs NIC list into variable
$nic = Get-VMNetworkAdapter -VM $vm
 
# Identify desired NIC
$nic[1]
 
# Enable MAC Address Spoofing
Set-VMNetworkAdapter -VMNetworkAdapter $nic[1] -MacAddressSpoofing On
 
# Allow VLANs
Set-VMNetworkAdapterVlan -VMNetworkAdapter $nic[1] -NativeVlanId 0 -AllowedVlanIdList "0,1,10,172,666" -trunk