Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 179681

Get RSS setting for each vmnicX on each host in multiple vCenters and export to file

$
0
0

I'm attempting to list the RSS setting for each vmnic on each ESXi host from a list of vCenters.

I'm able to list the vCenter, nic and RSS settings but can't list each ESXi host so I can easily review all the vCenters, ESXi Hosts, vmnicX and RSS settings.

Could someone please help me with identifying a way to capture the ESXi host?

 

Thank you.

 

 

#Export CSV file name

 

$ExportFilePath="c:\temp\RSSLB_MultipleVCenters.csv"


#Connect to the multiple vCenter servers. Ignore certificate errors

Write-Host"Connecting to vCenters"-ForegroundColor Cyan


$VIServers=Get-Content-Path C:\temp\vcenters.txt

$c=Get-Credential


Foreach($VIServerin$VIServers){

    $VIServer=Connect-VIServer$VIServer-Credential $c  -warningaction 0

    Write-Host"Connected to $VIServer"-ForegroundColor Cyan


    #List the RSS setting for each host in vCenter

    Get-VMHost|ForEach{

        $VMHost=$_

        $esxcli=Get-EsxCli-V2 -VMHost $VMHost

            ForEach-Object{

                $esxcli.network.nic.queue.loadbalancer.list.Invoke()| Select NIC,RSS,@{N="ESXi Host";E="$VMHost"},@{N="VCenterServer";E={$VIServer}}| FT

                $esxcli.network.nic.queue.loadbalancer.list.Invoke()| Select NIC,RSS,@{N="ESXi Host";E="$VMHost"},@{N="VCenterServer";E={$VIServer}}|Export-Csv-Path $ExportFilePath-Append -NoTypeInformation

                       }

    #Export results to file

    Export-Csv  -Path $ExportFilePath-Append -NoTypeInformation

    # Disconnect from vCenter

    Disconnect-VIServer$VIServer-confirm:$false

    Write-Host"Disconnected from $VIServer"-ForegroundColor Yellow

    }

Write-Host"RSS Info located at $ExportFilePath"-ForegroundColor Magenta

}

 


Viewing all articles
Browse latest Browse all 179681

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>