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

image

Now List your VM’s by typing “Get-VM”

image

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

image

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

image

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

image

As you can see above the SwitchName is now “HV VM TRAFFIC”

Comments

Popular posts from this blog

Office 365 Deployment Tool Office Download fails “Could not Install”

FRS to DFSR Post Cleanup “File Replication NtFrs Stopped”

Domain Migration SubinACL /Migratetodomain How To: