Automation

 View Only
  • 1.  Set-DistributedSwitchPortGroup - Only some settings applied

    Posted Oct 01, 2012 03:45 PM

    Hello,

    I've noticed the following behaviour from the Set-DistributedSwitchPortGroup module by LucD, when the below command is issued to set the dvportgroup security, and the values for parameters -PromiscuousMode -MacAddressChanges and -ForgedTransmits are set to boolean False only the -PromiscuousMode setting is actually applied.

    Set-DistributedSwitchPortGroup -Name $dvPortgroup.PG -PromiscuousMode ([bool]::Parse($dvPortgroup.PromiscuousMode)) -MacAddressChanges ([bool]::Parse($dvPortgroup.MACAddressChanges)) -ForgedTransmits ([bool]::Parse($dvPortgroup.ForgedTransmits)) -loadBalancing loadbalance_loadbased |out-null

    If the command is broken up, and and for example -MacAddressChanges are applied separately as below, this works ok....


    Set-DistributedSwitchPortGroup -Name $dvPortgroup.PG -MacAddressChanges ([bool]::Parse($dvPortgroup.MACAddressChanges)) | out-null

    Regards

    vKev



  • 2.  RE: Set-DistributedSwitchPortGroup - Only some settings applied

    Posted Oct 01, 2012 03:47 PM

    Is that from the module that comes with the PowerCLI Reference ?



  • 3.  RE: Set-DistributedSwitchPortGroup - Only some settings applied

    Posted Oct 01, 2012 03:53 PM

    Yes, I could download the latest copy and re-test, as I'm not sure if this may have already been fixed.



  • 4.  RE: Set-DistributedSwitchPortGroup - Only some settings applied

    Posted Oct 01, 2012 04:05 PM

    Try the download form here.

    That's the latest version of the module.

    If that also has the problem you mentioned, I will have to start a debugging session :smileygrin:



  • 5.  RE: Set-DistributedSwitchPortGroup - Only some settings applied

    Posted Oct 02, 2012 08:35 AM

    Hello LucD,

    I loaded the latest module, the problem persists and appears to be the combination of switches used i.e. the below example will not set PromiscuousMode, MacAddressChanges or ForgedTransmits

    Set-DistributedSwitchPortGroup -Name Public_S_B_0001 -PromiscuousMode $True -MacAddressChanges $True -ForgedTransmits $True -LoadBalancing loadbalance_loadbased

    But if you take off the -LoadBalancing parameter as below, it works fine.

    Set-DistributedSwitchPortGroup -Name Public_S_B_0001 -PromiscuousMode $True -MacAddressChanges $True -ForgedTransmits $True

    Regards

    vKev



  • 6.  RE: Set-DistributedSwitchPortGroup - Only some settings applied

    Posted Oct 02, 2012 12:05 PM

    There was indeed a design error in that function.

    I made some changes and attached the new version.

    Can you try if this works correctly now ?



  • 7.  RE: Set-DistributedSwitchPortGroup - Only some settings applied

    Posted Oct 02, 2012 12:39 PM

    Hi LucD,

    This works fine now with the new module.

    Thanks for the lighting fast turnaround!, I owe you a beer at vMworld Europe

    Regards

    vKev