I found how to rename:

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

or, with PowerShell:

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

What I need is to set a name for an Ethernet card I do not know the name of. The reason I need this is that some computers I'm servicing remotely simply reset their IP configuration by themselves from time to time (this is what the clients claim) and I need to be able to set them back to a working configuration automatically. Upon fixing this issue, the script seems easy to build:

netsh interface ip set address "connection name"^
netsh interface ip add dns "connection name"
netsh interface ip add dns "connection name" index=2

1 Answer 1


You can't name an interface, you can only rename it.

To get the current names of the interfaces on the computer you can use netsh interface show interface and then use some scripting fu to extract the name of the interface that you need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.