Jump to content

Renaming Single Hyper V Virtual Adapter in Powershell

Go to solution Solved by thething55,

I have just stumbled onto another post on Microsoft's site which explains the process much more clearly.

It is possible to rename based on a virtual adaptors MAC address.

 

If anyone else is curious or stumbles into the same issue I have posted the Powershell command I have just run.

 

Get-VMNetworkAdapter -VMName "yourVMs Name" | Where-Object -Property MacAddress -eq "Adaptors MAC Address" | Rename-VMNetworkAdapter -NewName "new Name for your Adaptor"

 

Credit to Eric Siron for showing it in an example

https://social.technet.microsoft.com/Forums/office/en-US/b4667ed9-5e94-4b3f-8bef-36bcbf4024d1/rename-vm-network-adapter?forum=winserverhyperv

Hi All,

 

I have a running Virtual Machine is Hyper V with about 4 different virtual adaptors.

I need to give each adaptor a unique name (they were all original called something like adaptor but they are all now called 1)

 

The only way I have found so far is to use powershell and type "Rename-VMNetworkAdapter"  with an option at the end for the new name.

If I run this command with the VM name and the new name then I can rename all of the virtual adaptors on the virtual machine but this doesn't help as the final result is a virtual machine with 4 adaptors that all use the same name.

There is an optional parameter "-name" which lets you name the adaptor you want to change the name of, however, this doesn't help as they are all currently using the same name so they all change again. haha

 

I am reading from this doc for context https://docs.microsoft.com/en-us/powershell/module/hyper-v/rename-vmnetworkadapter?view=win10-ps

 

 

If someone can think of a way to get around this then I am forever in your debt! :)

 

 

Thanks,

Scott

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

I have just stumbled onto another post on Microsoft's site which explains the process much more clearly.

It is possible to rename based on a virtual adaptors MAC address.

 

If anyone else is curious or stumbles into the same issue I have posted the Powershell command I have just run.

 

Get-VMNetworkAdapter -VMName "yourVMs Name" | Where-Object -Property MacAddress -eq "Adaptors MAC Address" | Rename-VMNetworkAdapter -NewName "new Name for your Adaptor"

 

Credit to Eric Siron for showing it in an example

https://social.technet.microsoft.com/Forums/office/en-US/b4667ed9-5e94-4b3f-8bef-36bcbf4024d1/rename-vm-network-adapter?forum=winserverhyperv

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×