Link to home
Start Free TrialLog in
Avatar of rye004
rye004Flag for United States of America

asked on

Getting promiscuous mode working in Hyper-V

I am trying to get promiscuous mode working in a clustered Hyper-V environment.  The host server is running Windows 2012 Server R2.  Below I have the PowerShell command and the results that I get back.


Command:
$portFeature=Get-VMSystemSwitchExtensionPortFeature -FeatureName "Port Mirroring" 
$portFeature.SettingsData.MonitorMode = 2 Add-VMSwitchExtensionPortFeature -ExternalPort -SwitchName "MySwitch" -VMSwitchExtensionFeature $portFeature

Open in new window


Results:
Get-VMSystemSwitchExtensionPortFeature : A positional parameter cannot be found that accepts argument '$null'.
At line:1 char:14
+ $portFeature=Get-VMSystemSwitchExtensionPortFeature -FeatureName "Port Mirroring ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-VMSystemSwitchExtensionPortFeature], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.HyperV.PowerShell.Commands.GetVMSystemSwitchExtens
   ionPortFeatureCommand

Open in new window


Can anyone tell me what I am doing wrong with my command?  The ultimate goal is to enable promiscuous mode on a single NIC so it can be used for Network monitoring.  I will then map that single NIC to a virtual machine.
ASKER CERTIFIED SOLUTION
Avatar of Philip Elder
Philip Elder
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rye004

ASKER

Philip,

Thank you for the information that you have sent me.  I have been spending the morning reviewing it.  I am trying to fully understand the commands before I run them in our production environment.  It appears, that I was specifying the wrong “-FeatureName”.

I will continue working on this and will update this posting.

Many Thanks!
Avatar of rye004

ASKER

Sorry for the delay in responding.  I just got time today to run this.  This worked perfectly!  Promiscuous mode is working as expected.  Many Thanks!