13 Replies Latest reply on Jul 7, 2020 1:17 AM by LucD

    Unable to set the physicalNIC speed config value to auto-negotiate

    Jayasreek93 Novice

      I'm hoping someone could tell what's wrong in this expression. I have less/no experience in scripting. I ran this script from vmware powercli and I connected to vcenter.

      This is to set the configured speed(mentioned in the screen shot) of a physical nic of an ESX host to auto negotiate, which is currently set to 10000 MB.

      physical nic : vmnic0

      configured speed to be set: auto negotiate

      VMhost name value is changed to xyz here.


      I have 80 more hosts for which the vmnic values are to be set to autonegotiate as per the recommended settings. 4 nics are present for each ESX host. Totally I have to modify 320 times in order to perform this manually and get this fixed. Can someone help me with a script


      PS C:\Windows\system32> Set-VMHostNetworkAdapter -vmhost xyz.contoso.net -PhysicalNic vmnic0 -AutoNegotiate



      Set-VMHostNetworkAdapter : Cannot bind parameter 'PhysicalNic'. Cannot convert the "vmnic0" value of type "System.String" to type


      At line:1 char:80

      + ...  -vmhost xyz.contoso.net -PhysicalNic vmnic0 -AutoNe ...

      +                                                            ~~~~~~

          + CategoryInfo          : InvalidArgument: (:) [Set-VMHostNetworkAdapter], ParameterBindingException

          + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.SetVMHostNetworkAdapt