Server 2012 Hyper-V Free Changing Network Switch Command
Problem: You need to change your network interface/Switch on a VM from the Command line interface on your Server 2012 Hyper-V free console
Solution: Use the following powershell commands:
Note: you do not need to download or install any third party Powershell add-ons to perform these tasks.
In the Administrative window type in “Powershell.exe” and enter
Now List your VM’s by typing “Get-VM”
Now we will check its current “switch” by typing in “Get-VMNetworkAdapter”
which will then prompt you for the VMname or names you wish to query
Now we will change its current “switch” to my switch named “HV VM TRAFFIC” by typing in “Connect-VMNetworkAdapter –Switchname “HV VM TRAFFIC” which will then prompt you for the VMname or names you wish to change to this switch
Now we will check its current “switch” by typing in “Get-VMNetworkAdapter”
which will then prompt you for the VMname or names you wish to query
As you can see above the SwitchName is now “HV VM TRAFFIC”
Comments
Post a Comment