VLAN Insanity

I’ve been pulling my hair out running pfSense as a guest in a Hyper-V environment, I think I’m finally to the point where I can get it going but I had to share this nugget:

Get-VMNetworkAdapter -VMName "VMNAMEHERE" | Where-Object -Property MacAddress -eq "MACADDRESSHERE" | Rename-VMNetworkAdapter -NewName "NEWNAMEHERE"

For my set up I need to trunk VLANs 1 and 10 for my access and IoT stuff, and VLAN 2 on my WAN side because my ISP demands the traffic to be tagged with VLAN 2 for some reason. It turns out this can’t be done from the Hyper-V Manager GUI and can only be done with Powershell but any other attempt to rename the virtual adapter leads to all of them being renamed.