cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
545
Views
0
Helpful
0
Comments
James Welch
Cisco Employee
Cisco Employee
#Credentials
$vcenterIP = '10.10.10.10'
$vcusername = 'cisco@vc.local'
$vcpass = 'Cisco123'

#Set Variables - change file name an path as needed.  Change ESXi cluster name as needed
$vmnicscsv = '.\vmnics.csv'
$cluster = 'TestCluster'

#Connect to vCenter and gather info
Connect-VIServer -Server $vcenterIP -Protocol https -User $vcusername -Password $vcpass


Get-Cluster $cluster | Get-VM | Get-NetworkAdapter | 
Select @{N="VM";E={$_.Parent.Name}},Name,NetworkName |
export-Csv  $vmnicscsv -NoTypeInformation

Disconnect-VIServer -Server $vcenterIP -Force

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links