VMware Cloud Community
cpaterik
VMware Employee
VMware Employee

Get and Set Physical NIC Properties

In the vSphere client, you can display and set some properties for physical nics. What is the easiest way to display all the physical nics on an ESX host? A cmdlet would be great.

How do you set the properties of a physical nic in PowerCLI?

Reply
0 Kudos
4 Replies
ae_jenkins
Enthusiast
Enthusiast

Hi

I'm not sure 100% what you are looking for but to display the basic physical NIC information:

Get-Vmhost "YourHostName" | Get-vmhostnetworkadapter -physical

Or

Get-Vmhost "YourHostName" | Get-vmhostnetworkadapter -physical | format-list

To set information (using the above example):

$VMHostNW = Get-Vmhost "YourHostName" | Get-vmhostnetworkadapter -physical

Set-vmhostnetworkadapter -physicalnic $vmhostnw -autonegotiate

This would convert all your physical NICs on the ESX host you specified to Autonegotiate network speed.

If you have a more specific need, please post it Smiley Wink

Thanks

Running PowerCLI 4.0U1

Reply
0 Kudos
ae_jenkins
Enthusiast
Enthusiast

Hi

I'm not sure 100% what you are looking for but to display the basic

physical NIC information:

Get-Vmhost "YourHostName" | Get-vmhostnetworkadapter -physical

Or

Get-Vmhost "YourHostName" | Get-vmhostnetworkadapter -physical |

format-list

To set information (using the above example):

$VMHostNW = Get-Vmhost "YourHostName" | Get-vmhostnetworkadapter

-physical

Set-vmhostnetworkadapter -physicalnic $vmhostnw -autonegotiate

This would convert all your physical NICs on the ESX host you specified

to Autonegotiate network speed.

If you have a more specific need, please post it Smiley Wink

Thanks

Reply
0 Kudos
ae_jenkins
Enthusiast
Enthusiast

Oh, those cmdlets only work with vSphere ESX hosts. I'm running

PowerCLI 4.0 U1

Reply
0 Kudos
ae_jenkins
Enthusiast
Enthusiast

Whoops! Sorry for all the multiple postings

Reply
0 Kudos