Wow the Beattles are into Powershell? I got this from a colleage when working through my new ESXi config scripts.
$physnics = get-vmhost <vmhost> | get-vmhostnetwork | % {$_.Physicalnic}
set-vmhostnetworkadapter -PhysicalNic $physnics -BitRatePerSecMB <bitrate> -Duplex <duplex>
I then sleep for 5 seconds with
start-sleep -s 5
then send a reconnect - if you're doing all nics, you'll be doing the NIC that your attaching to for running the script. Some environments flip duplex quicker so you may have to adjust the seconds.
Message was edited by: olan025
To do a specific one... Add this following the first line starting with the pipe........... | where { $_.DeviceName -like "vmnic0"}
$physnics= get-vmhost <vmhost> | get-vmhostnetwork | %{$_.physicalnic}| where { $_.DeviceName -like "vmnic0"}
set-vmhostnetworkadapter -PhysicalNic $physnics -BitRatePerSecMB 1000 -Duplex full