Running Pfsense on Hyper-V server with VLANs

I was struggling to get running network connectivity on my Pfsense Virtual Machine running on Hyper-V with VLANs. I found a following way how to sort this out with power shell:


Get-VMNetworkAdapter -VMName "vmname" | Where-Object {$_.MacAddress -eq "XXXXXXXXXXXX"} | Set-VMNetworkAdapterVlan -Trunk -AllowedVlanIdList "1-100" -NativeVlanId 1

You will have to run it on Hyper-V, change your vmname, macaddress and adjust AllowedVlanList.