Skip to content

How to set the LoadBalancingPolicy using PowerCLI

17 February 2012

As a virtualisation admin you maybe tasked with configuring VMware’s vSwitches in a particular load balancing configuration. I have had to do this for link aggregation between the teaming of my vmnic’s and physical Cisco switches.  See the link for more info:

Here’s how I did it using PowerCLI.

Connect-VIServer VirtualCenterServerFQDN
Get-VMHost -Name HostName | Get-VirtualSwitch -name vSwitchNumber |
Get-NicTeamingPolicy | Set-NicTeamingPolicy -LoadBalancingPolicy LoadBalanceIP

Just bear in mind you will need to set the, Virtual Center Server, Host Nane and vSwitch name.

I hope this helps!



From → PowerCLI

One Comment
  1. Anne permalink

    Tried for hours to script this policy change. Thank you!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: