Hi,
Please find the script attached, I am assuming you are connected to the vCenter server.
Modify the bold and italic line below to change the output location.
$output = foreach ($esxi in Get-Cluster | Get-VMHost | Sort Name)
{
$esxi | Select-Object @{N="ESXi";E={$_.Name}}, @{N="Physical Adapter";E={[string]::Join(",",($_.ExtensionData.Config.Network.Pnic | Sort Device | %{$_.Device}))}}, @{N="MAC Address";E={[string]::Join(",",($_.ExtensionData.Config.Network.Pnic | Sort Device | %{$_.Mac}))}}, @{N="vSwitch Name";E={$_ | Get-VirtualSwitch | %{$_.Name}}}, @{N="vSwitch Teaming Policy";E={$_ | Get-VirtualSwitch | %{$_.ExtensionData.Spec.Policy.NicTeaming.Policy}}}
}
$output | Export-CSV "C:\output.csv"
The following is a sample output.
ESXi: test.test.com
Physical Adapter: vmnic0,vmnic1
MAC Address: 00:11:22:33:44:55,00:11:22:33:44:56
vSwitch Name: vSwitch0
vSwitch Teaming Policy : loadbalance_srcid
Hope this helps,
Steven.