vSwitch in Promiscuous Mode

%3CLINGO-SUB%20id%3D%22lingo-sub-2659675%22%20slang%3D%22en-US%22%3EvSwitch%20in%20Promiscuous%20Mode%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2659675%22%20slang%3D%22en-US%22%3E%3CP%3EHello%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20Server%202019%20Hyper-V%20Host%20and%20need%20to%20setup%20one%20of%20the%20vSwtiches%20for%20port%20mirroring%20in%20Promiscuous%20Mode.%20I%20have%20done%20this%20in%20the%20past%20using%20the%20below%20PS%20but%20am%20getting%20an%20error%20on%20this%20Host%20(previous%20hosts%20were%20running%202012R2).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20what%20I%20am%20typing%20into%20PS%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EPS%20C%3A%5CWindows%5Csystem32%26gt%3B%20%24a%20%3D%20Get-VMSystemSwitchExtensionPortFeature%20-FeatureId%20776e0ba7-94a1-41c8-8f28-951f524251b5%0A%0APS%20C%3A%5CWindows%5Csystem32%26gt%3B%20%24a.SettingData.MonitorMode%20%3D%202%0A%0APS%20C%3A%5CWindows%5Csystem32%26gt%3B%20Add-VMSwitchExtensionPortFeature%20-ExternalPort%20%E2%80%93SwitchName%20NAMEOFMYSWITCH%20-VMSwitchExtensionFeature%20%24a%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20get%20the%20below%20error%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EAdd-VMSwitchExtensionPortFeature%20%3A%20Failed%20while%20modifying%20virtual%20Ethernet%20switch%20connection%20settings.%0A%0AAt%20line%3A1%20char%3A1%0A%0A%2B%20Add-VMSwitchExtensionPortFeature%20-ExternalPort%20%E2%80%93SwitchName%20NAMEOFMYSWITCH%20...%0A%0A%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%0A%0A%2B%20CategoryInfo%20%3A%20NotSpecified%3A%20(%3A)%20%5BAdd-VMSwitchExtensionPortFeature%5D%2C%20VirtualizationException%0A%0A%2B%20FullyQualifiedErrorId%20%3A%20OperationFailed%2CMicrosoft.HyperV.PowerShell.Commands.AddVMSwitchExtensionPortFeature%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20no%20idea%20what%20to%20do%20next%2C%20does%20anyone%20have%20any%20suggestions%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMany%20thanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2659675%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EHyper-V%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Visitor

Hello

 

I have a Server 2019 Hyper-V Host and need to setup one of the vSwtiches for port mirroring in Promiscuous Mode. I have done this in the past using the below PS but am getting an error on this Host (previous hosts were running 2012R2).

 

Here is what I am typing into PS:

 

 

PS C:\Windows\system32> $a = Get-VMSystemSwitchExtensionPortFeature -FeatureId 776e0ba7-94a1-41c8-8f28-951f524251b5

PS C:\Windows\system32> $a.SettingData.MonitorMode = 2

PS C:\Windows\system32> Add-VMSwitchExtensionPortFeature -ExternalPort –SwitchName NAMEOFMYSWITCH -VMSwitchExtensionFeature $a

 

 

I get the below error:

 

 

Add-VMSwitchExtensionPortFeature : Failed while modifying virtual Ethernet switch connection settings.

At line:1 char:1

+ Add-VMSwitchExtensionPortFeature -ExternalPort –SwitchName NAMEOFMYSWITCH ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : NotSpecified: (:) [Add-VMSwitchExtensionPortFeature], VirtualizationException

+ FullyQualifiedErrorId : OperationFailed,Microsoft.HyperV.PowerShell.Commands.AddVMSwitchExtensionPortFeature

 

 

I've no idea what to do next, does anyone have any suggestions?

 

Many thanks

0 Replies