Skip to content

Instantly share code, notes, and snippets.

@stathy
Last active August 29, 2015 14:17
Show Gist options
  • Save stathy/3e7b7e29a9bc0fa3479d to your computer and use it in GitHub Desktop.
Save stathy/3e7b7e29a9bc0fa3479d to your computer and use it in GitHub Desktop.
powershell_script "Setup Team0 Adapter" do
code <<-'EOH'
New-NetLbfoTeam -Name Team0 -TeamNicName TeamNIC0 -TeamMembers NIC0700,NIC1000 -TeamingMode LACP -LoadBalancingAlgorithm TransportPorts -Confirm:$False
'EOH'
end
powershell_script "Setup Team1 Adapter" do
code <<-'EOH'
New-NetLbfoTeam -Name Team1 -TeamNicName TeamNIC1 -TeamMembers NIC0300,NIC0301 -TeamingMode LACP -LoadBalancingAlgorithm TransportPorts -Confirm:$False
'EOH'
end
# Implied -TeamingMode LACP -LoadBalancingAlgorithm TransportPorts -Confirm:$false
windows_net_team "Setup Team0 Adapter" do
name "Team0"
nic_name "TeamNIC0"
members [ 'NIC0700', 'NIC1000' ]
end
# Implied -TeamingMode LACP -LoadBalancingAlgorithm TransportPorts -Confirm:$false
windows_net_team "Setup Team1 Adapter" do
name "Team1"
nic_name "TeamNIC1"
members [ 'NIC0300', 'NIC0301' ]
end
@stathy
Copy link
Author

stathy commented Mar 26, 2015

Adapter Teaming

powershell_script "Setup Team0 Adapter" do
  code <<-'EOH'
    New-NetLbfoTeam -Name Team0 -TeamNicName TeamNIC0 -TeamMembers NIC0700,NIC1000 -TeamingMode LACP -LoadBalancingAlgorithm TransportPorts -Confirm:$False
  'EOH'
end

powershell_script "Setup Team1 Adapter" do
  code <<-'EOH'
      New-NetLbfoTeam -Name Team1 -TeamNicName TeamNIC1 -TeamMembers NIC0300,NIC0301 -TeamingMode LACP -LoadBalancingAlgorithm TransportPorts -Confirm:$False
  'EOH'
end

CONVERT TO

# Implied -TeamingMode LACP -LoadBalancingAlgorithm TransportPorts -Confirm:$false
windows_net_team "Setup Team0 Adapter" do
  name "Team0"
  nic_name "TeamNIC0"
  members [ 'NIC0700', 'NIC1000' ]
end

# Implied -TeamingMode LACP -LoadBalancingAlgorithm TransportPorts -Confirm:$false
windows_net_team "Setup Team1 Adapter" do
  name "Team1"
  nic_name "TeamNIC1"
  members [ 'NIC0300', 'NIC0301' ]
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment