Hi all,
I would like to automatically check if all the nics of all ESXi are configured as AutoNegotiate
the Get-VMHostNetworkAdapter does not provide this information
Thks for help
Try this
Get-VMHost | Get-View | %{
$esx = $_
$_.Config.Network.Pnic | %{
if(!$_.Spec.LinkSpeed){
$auto = $true
}
else{
$auto = $false
}
$row = "" | Select ESX, pNIC, Autonegotiate
$row.ESX = $esx.Name
$row.pNIC = $_.Device
$row.Autonegotiate = $auto
$row
}
}
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try this
Get-VMHost | Get-View | %{
$esx = $_
$_.Config.Network.Pnic | %{
if(!$_.Spec.LinkSpeed){
$auto = $true
}
else{
$auto = $false
}
$row = "" | Select ESX, pNIC, Autonegotiate
$row.ESX = $esx.Name
$row.pNIC = $_.Device
$row.Autonegotiate = $auto
$row
}
}
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
