- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No clue what you mean by 'Admin status' and 'Description'.
The others you can do like this
ForEach-Object -Process {
$esxcli = Get-EsxCli -VMHost $esx -V2
$esxcli.network.vswitch.standard.list.Invoke() |
ForEach-Object -Process {
$vss = $_
$vss.Uplinks | where{$_ -ne $null} | %{
$nic = $_
$netAdapt = Get-VMHostNetworkAdapter -VMHost $esxcli.VMHost -Name $nic
$esxcli.network.nic.get.Invoke(@{nicname="$_"}) |
Select @{N='VMHost';E={$esx.Name}},
@{N='Switch';E={$vss.Name}},
@{N='NIC';E={$nic}},
@{N='Driver';E={$_.DriverInfo.Driver}},
@{N='MAC';E={$_.VirtualAddress}},
@{N='MTU';E={$vss.MTU}},
@{N='Speed';E={$netAdapt.BitRatePerSec}},
@{N='Duplex';E={$netAdapt.FullDuplex}},
@{N='PCI';E={$netAdapt.PciId}},
LinkStatus
}
}
$esxcli.network.vswitch.dvs.vmware.list.Invoke() |
ForEach-Object -Process {
$vds = $_
$vds.Uplinks | where{$_ -ne $null} | %{
$nic = $_
$netAdapt = Get-VMHostNetworkAdapter -VMHost $esxcli.VMHost -Name $nic
$esxcli.network.nic.get.Invoke(@{nicname="$_"}) |
Select @{N='VMHost';E={$esx.Name}},
@{N='Switch';E={$vds.Name}},
@{N='NIC';E={$nic}},
@{N='Driver';E={$_.DriverInfo.Driver}},
@{N='MAC';E={$_.VirtualAddress}},
@{N='MTU';E={$vds.MTU}},
@{N='Speed';E={$netAdapt.BitRatePerSec}},
@{N='Duplex';E={$netAdapt.FullDuplex}},
@{N='PCI';E={$netAdapt.PciId}},
LinkStatus
}
}
} | Format-Table -AutoSize
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference