Configure Hyper-V NIC in Promiscuous Mode

Hyper-V NIC configured in promiscuous mode allows you to monitor external traffic.

  1. Open Powershell.

  2. Run the following command to add a VMSwitch Port Feature, where "LAN2" is your virtual switch name.

    SettingData.MonitorMode = 2)

    $A=Get-VMSystemSwitchExtensionPortFeature -FeatureName "Ethernet Switch Port Security Settings"

    (OR $A = Get-VMSystemSwitchExtensionPortFeature -FeatureId 776e0ba7-94a1-41c8-8f28-951f524251b5)

    $A.SettingData.MonitorMode = 2

    Add-VMSwitchExtensionPortFeature -ExternalPort -SwitchName LAN2 -VMSwitchExtensionFeature $A

  3. Run the following command to change the PortMirroring Attribute of the VM Networkdevice, where "VMName 06_WinXPMonitor" is your VM name and "00155D016612" is the MAC address of your adapter.

    Get-VMNetworkAdapter -VMName 06_WinXPMonitor | ? MacAddress -eq '00155D016612' | Set-VMNetworkAdapter -PortMirroring Destination