hi,
i have a script that use the Get-VMHostNetworkAdapter cmdlet.
it runs on several esxi server (5.5u3) but other fail with the following error:
Get-VMHostNetworkAdapter : 03/08/2017 09:53:25 | Get-VMHostNetworkAdapter | | Value cannot be null. |
Parameter name: key | |
At line:4 char:76
+ ... .xxx.internal" | Get-VMHostNetworkAdapter | Where ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-VMHostNetworkAdapter], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.GetVMHostNetworkAdapter
i can't figure out what is the difference between the hosts (as they installed from the same iso, use the same profile etc..)
Example:
PS M:\> Get-VMHost "pru-esx01.xxx.internal" | Get-VMHostNetworkAdapter
Name Mac DhcpEnabled IP SubnetMask DeviceName
---- --- ----------- -- ---------- ----------
vmnic0 00:25:xx:xx:00:00 False vmnic0
vmnic1 00:25:xx:xx:00:00 False vmnic1
vmnic10 00:25:xx:xx:00:05 False vmnic10
vmnic11 00:25:xx:xx:00:05 False vmnic11
vmnic2 00:25:xx:xx:00:01 False vmnic2
vmnic3 00:25:xx:xx:00:01 False vmnic3
vmnic4 00:25:xx:xx:00:02 False vmnic4
vmnic5 00:25:xx:xx:00:02 False vmnic5
vmnic6 00:25:xx:xx:00:03 False vmnic6
vmnic7 00:25:xx:xx:00:03 False vmnic7
vmnic8 00:25:xx:xx:00:04 False vmnic8
vmnic9 00:25:xx:xx:00:04 False vmnic9
vmk0 00:25:xx:xx:00:00 False 10.xxx.xxx.40 255.255.255.0 vmk0
vmk1 00:50:xx:xx:63:22 False 30.30.30.1 255.255.255.0 vmk1
vmk4 00:50:xx:xx:b2:d7 False 10.xxx.xxx.1 255.255.255.224 vmk4
vmk3 00:50:xx:xx:c5:cf False vmk3
PS M:\> Get-VMHost "pru-esx05.xxx.internal" | Get-VMHostNetworkAdapter
Get-VMHostNetworkAdapter : 03/08/2017 10:28:30 Get-VMHostNetworkAdapter Value cannot be null.
Parameter name: key
At line:1 char:63
+ ... sx05.oob.ramportal.eng.pelephone.internal" | Get-VMHostNetworkAdapter
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-VMHostNetworkAdapter], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.GetVMHostNetworkAdapter
any help will be appreciated.
thanks
mordechai