How to change network adapter name via command line in windows 7?

frankcui24 asked:

Is there a way to change the network adapter name in batch or powershell script? possibly by specifying a connection number ?

Thanks in advance.

I answered:

Easy enough without PowerShell:

netsh interface set interface name="Old Name" newname="New Name"

Easy enough with PowerShell:

Get-NetAdapter -Name "Old Name" | Rename-NetAdapter -NewName "New Name"

Of course, in PS, you can also select your adapter by whatever property you see fit.

Get-NetAdapter -InterfaceIndex 12 | Rename-NetAdapter -NewName "New Name"

Swiped from Technet Blogs, which has a couple of other more complicated ways.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.