Automation

 View Only
  • 1.  Report for VSS and vmhost adapter attached to each vswitch

    Posted Jul 18, 2014 08:02 AM

    Hi  there,

    I have multiple esxi host, each host have two VSS and 4 physical nics

    I want to pull a report which shows esxi host, vswitch, physical nic

    for instace

    esxi1 vswitch0  vmnic0

    esxi1 vswitch0 vmnic2

    esxi1 vswitch1 vmnic1

    esxi1 vswitch1 vmnic3



  • 2.  RE: Report for VSS and vmhost adapter attached to each vswitch
    Best Answer

    Posted Jul 18, 2014 09:24 AM

    Try like this

    foreach($esx in Get-VMHost){
     
    foreach($sw in Get-VirtualSwitch -VMHost $esx -Distributed:$false){
       
    $sw.Nic | Select @{N="ESXi";E={$esx.Name}},
         
    @{N="Switch";E={$sw.Name}},
         
    @{N="Nic";E={$_}}
      }
    }


  • 3.  RE: Report for VSS and vmhost adapter attached to each vswitch

    Posted Jul 18, 2014 12:38 PM

    Thanks Lucd it was perfect !!! you rock !!!!!:smileyhappy::smileyhappy::smileyhappy::smileyhappy: