Create a new Hyper-V Virtual Switch for Mirroring
Identify an open physical NIC on the Hyper-V host to connect to the mirror port you have configured in the switch. If you have a switch capable of RSPAN, you can leverage that instead of a dedicated physical NIC. Please take a look at our Cisco RSPAN documentation for more details.
Open the Hyper-V manager and connect to the desired Hyper-V host to manage
In the right pane, choose Virtual Switch Manager
Create a new External switch by choosing External and clicking Create New Virtual Switch
Name the switch appropriately (e.g. Mirror_Switch)
Choose the same physical NIC you selected in step 1 and designate it as the external NIC to connect to
Open up a PowerShell session on the Hyper-V host and execute the following commands replacing Mirror_Switch on the third command with your desired switch name you selected in step 5.
$a = Get-VMSystemSwitchExtensionPortFeature -FeatureId 776e0ba7-94a1-41c8-8f28-951f524251b5 $a.SettingData.MonitorMode = 2 add-VMSwitchExtensionPortFeature -ExternalPort -SwitchName Mirror_Switch -VMSwitchExtensionFeature $a