Comments on: Free Script: Network Team and Virtual Switch Manipulation for Hyper-V 2012 https://www.altaro.com/hyper-v/free-script-network-team-and-virtual-switch-manipulation-for-hyper-v-2012/ Hyper-V guides, how-tos, tips, and expert advice for system admins and IT professionals Wed, 31 Mar 2021 06:28:55 +0000 hourly 1 By: Eric Siron https://www.altaro.com/hyper-v/free-script-network-team-and-virtual-switch-manipulation-for-hyper-v-2012/#comment-1540 Thu, 20 Jul 2017 16:39:00 +0000 http://hub.altaro.com/hyper-v/?p=2976#comment-1540 In reply to Pedro da Silva.

This script predates R2 and wasn’t updated. When I get some time, I will patch it in.

]]>
By: Pedro da Silva https://www.altaro.com/hyper-v/free-script-network-team-and-virtual-switch-manipulation-for-hyper-v-2012/#comment-1539 Wed, 19 Jul 2017 10:54:00 +0000 http://hub.altaro.com/hyper-v/?p=2976#comment-1539 In reply to Pedro da Silva.

Ok, I can now see the Dynamic mode that was introduced with Windows 2012 R2 is not supported in this script.

]]>
By: Pedro da Silva https://www.altaro.com/hyper-v/free-script-network-team-and-virtual-switch-manipulation-for-hyper-v-2012/#comment-1538 Wed, 19 Jul 2017 10:30:00 +0000 http://hub.altaro.com/hyper-v/?p=2976#comment-1538 Thank you for this script. A question that is bugging me, though. How do the load balancing algorithms in the script map to the GUI? For example, in LACP mode, the script lists Hyper-V Ports, Transport Ports, IP Addresses and MAC Addresses. The first I can understand. But which one will map, say, to the Dynamic Mode we can select using the GUI?

]]>
By: DSN https://www.altaro.com/hyper-v/free-script-network-team-and-virtual-switch-manipulation-for-hyper-v-2012/#comment-1537 Tue, 15 Jul 2014 17:03:00 +0000 http://hub.altaro.com/hyper-v/?p=2976#comment-1537 excellent work dude, works a charm!!

]]>
By: Eric Siron https://www.altaro.com/hyper-v/free-script-network-team-and-virtual-switch-manipulation-for-hyper-v-2012/#comment-1536 Tue, 25 Jun 2013 14:47:00 +0000 http://hub.altaro.com/hyper-v/?p=2976#comment-1536 In reply to tom miller.

Thanks for the heads-up. Inconsistency certainly wasn’t intentional. In all cases, the inputs should only check to see if there is a “y” or an “n” for the first character. I’ll give it a review.

]]>
By: tom miller https://www.altaro.com/hyper-v/free-script-network-team-and-virtual-switch-manipulation-for-hyper-v-2012/#comment-1535 Tue, 25 Jun 2013 14:30:00 +0000 http://hub.altaro.com/hyper-v/?p=2976#comment-1535 Eric,
Great script! Just a minor comment: When replying to yes or no, sometimes you have to enter YES or NO, other times you enter Y or N. Be cleaner if it’s one way or another for the entire script.

Thanks for the hard work.
Tom

]]>
By: James Stephan https://www.altaro.com/hyper-v/free-script-network-team-and-virtual-switch-manipulation-for-hyper-v-2012/#comment-1534 Mon, 17 Jun 2013 16:07:00 +0000 http://hub.altaro.com/hyper-v/?p=2976#comment-1534 If you want some suggestions of items to change/add to corefig I have a lot. Most of which are in my projects and or blog. I would love to donate my scripts and or knowledge. Contact me at james_stephan@yahooDOTcom. I think corefig could be really great with the right add-ons.

]]>
By: Eric Siron https://www.altaro.com/hyper-v/free-script-network-team-and-virtual-switch-manipulation-for-hyper-v-2012/#comment-1533 Sat, 15 Jun 2013 02:31:00 +0000 http://hub.altaro.com/hyper-v/?p=2976#comment-1533 In reply to James Stephan.

Well, thanks! I’m honored to be asked. At this time, I’m in the middle of two major projects, one of which is a bottom-up rework of the Corefig project, which seems to have some overlap with what you’re doing. The other project is consuming most of my time, but we can circle back at a later time.

]]>
By: James Stephan https://www.altaro.com/hyper-v/free-script-network-team-and-virtual-switch-manipulation-for-hyper-v-2012/#comment-1532 Fri, 14 Jun 2013 19:00:00 +0000 http://hub.altaro.com/hyper-v/?p=2976#comment-1532 AI have written a very simple powershell script to add vswitch, now where near the polished code you write, but it does simplify the NIC selection. In your code it brings up the alias name and you have to figure out what phyical nic that is.

This code take the guess work out of it, for a simple vswitch that is to use the smae NIC and IP as your VHOST management NIC or if you only have one NIC.

$VHOST = $Env:COMPUTERNAME
$vhost
get-vmswitch
Write-Host -foreground “magenta” “”
Write-Host -foreground “magenta” “If there are no vSwitches shown, you have none built. ”
Write-Host -foreground “magenta” “”

#Get the NIC aliases and Ip addresses
Write-Host -foreground “magenta” “Listing of your NIC’s and IP addresses”
Get-NetIPAddress | Where-Object {$_.ipaddress -like “*.*.*.*”} | select interfacealias, ipaddress | format-table -autosize

#Ask for input
$SelectedIndex = Read-Host “Type 0 to exit out of this Menu or Enter to Continue”
$Exit = $SelectedIndex

if($EXIT -eq 0)
{exit}
else {
$SelectedIndex1 = Read-Host “Type the Interface Alias name that is next to your VHOST’s IP Address”
$SelectedIndex2 = Read-Host “Type the vSwitch Name”

$NIC = $SelectedIndex1
$VSWITCH = $SelectedIndex2

Write-Host -foreground “magenta” “”
Write-Host -foreground “magenta” “Creating the vSwitch called “$VSWITCH” on the NIC named “$NIC” – Be patient this takes approx 90 seconds.”
New-VMSwitch -Name “$VSWITCH” -NetAdapterName “$NIC” -AllowManagementOS $True
get-vmswitch}

For a newbie using this code should be simple, your code asks questions I still do not know the real answer too but I just got lucky with my guesses. Hope this helps. someone out there.

]]>
By: James Stephan https://www.altaro.com/hyper-v/free-script-network-team-and-virtual-switch-manipulation-for-hyper-v-2012/#comment-1531 Fri, 14 Jun 2013 18:51:00 +0000 http://hub.altaro.com/hyper-v/?p=2976#comment-1531 Love your articles and scripts… Looking for a heavy hitter to join my codeplex projects. Hoping you are interested. Project 1 is reporting.codeplex.com it is a very simple script ( by your coding standards) that gets you a detailed inventory report of the VHOST and it’s VM’s for Free Core and datacenter standalone 2012 servers. Project 2 (yet to kick off) is http://stephanco.blogspot.com/2013/06/building-hyper-v-vhost-without-buying.html… it is a amalgum of batch files and powershell scripts.. yes even your Switches and teams… that allows you to configure and manage a Free Core 2012 server without having to have a pay for 3rd party app like vt utilities, 5Nine manager or windows 8 / Server 2012 GUI to Hyper-v Manager. It is not as clean as i would like it but it works. There is a replacement for vmconnect.exe (which does not come with free core server) an open source app called wfreeRDP.exe. You have to have this or you can not connect to a VM that has not IP yet. Please let me know if you are interest in joining either or both of my porjects. i clould use a coder with your talents. Thanks for all you hard work I have benefited greatly from your sharing and knowledge.

]]>