LucD
Leadership
Leadership

Not sure I got the question 100%, but do you mean something like this?

$lagInfo = foreach($vds in Get-VDSwitch){

    $vds | Get-VMHost | %{

        $esxcli = Get-EsxCli -VMHost $_

        $esxcli.network.vswitch.dvs.vmware.lacp.config.get() |

            Select DVSName,LAGName,LAGID

    }

}

$lagInfo | Sort-Object -Property LAGName -Unique


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post