In Hyper-V manager, in the right navigation panel, click Virtual Switch Manager.
Click External, then click Create New Virtual Switch.
Type an appropriate name for the switch. For example, Virtual_Switch_Name.
Select the physical NIC you identified and designate it as the external NIC to connect.
Click OK.
On the Hyper-V host, as an Administrator, open a PowerShell session.
Execute the following commands, which enable the virtual switch to receive packets from the physical mirror port:
$a = Get-VMSystemSwitchExtensionPortFeature -FeatureId 776e0ba7-94a1-41c8-8f28-951f524251b5
$a.SettingData.MonitorMode = 2
add-VMSwitchExtensionPortFeature -ExternalPort -SwitchName <virtual_switch_name> -VMSwitchExtensionFeature $a
, where<virtual_switch_name>
is the name of the virtual switch you identified in Step 4.In the right navigation panel, click Virtual Switch Manager.
Click the + button next to the virtual switch you identified in Step 4.
Click Extensions.
Ensure Microsoft NDIS Capture is selected.
Click OK.