Rename a Network Interface from the Command Line

While building a Hyper-V server this week, I decided to rename the network interfaces to something that would make identifying the iSCSI connections a little easier. Since the server was installed with only the core (no GUI) installation of Windows Server 2008 R2, the process had to be performed from the command line. The network interface is also commonly referred to by other names such as network adapter or network connection.

To show a list of the network interfaces, run the following command:

To rename the “Local Area Connection 5” in the image shown above to the name “iSCSI1”, use the following command:

Run the show interface command again to verify the name changed:

Now aren’t the network interface names in the above image a lot easier to deal with than the generic ones shown in the first image?



  1. Seth Fulton

    This issue also was tackled a few years back by the scripting guys:

    Does anyone have a PowerShell method they would like to share?

  2. aradillas

    How rename a network interface if the user hasn’t administrator rights?

  3. Cheryl

    Something like this should work:
    $AdapterToChange = Get-WmiObject win32_NetworkAdapter |where { $_.NetConnectionID -like “Local Area Conn*”}
    $AdapterToChange.netConnectionID = “clb”

  4. Frank

    Works fine – thumbs up!
    You are my Hyper-V hero of the day 🙂

  5. Echo

    Any ideas on a automation script that will detect the last installed network, and modify it?

    Say.. if a loopback adapter was installed via DEVCON, the script would need to know the name of the loopback adapter given that it will be different depending on how many current connections the user already has.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: