24

How can I safely remove a network connection that is no longer visible in Control Panel\All Control Panel Items\Network Connections on Windows 10?

I want to reuse the name of a previously existing connection, "USB Ethernet", so that I can programmatically find this connection on multiple PCs if it exists.

When I try to rename one of the connections I get the following error message: "Cannot rename this connection. A connection with the name that you specified already exists. Specify a different name."

Example error

There are no hidden adaptors in Device Manager: https://support.microsoft.com/en-gb/help/315539/device-manager-does-not-display-devices-that-are-not-connected

Other posts mention editing the registry and removing the GUID that represents that specific connection under: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network

However, this connection may be referenced in other places within the registry. How can I safely remove the connection and all its references?

There are many unused/hidden connections on my machine according to the registry: Local Area Connection* 11, Local Area Connection* 2, Local Area Connection* 7 etc.

1
  • 1
    I found this link, which is a discussion about the naming of hidden network connections, written by the guy that claims he was the originator of the current naming scheme at Microsoft. I have a PC now, which will connect to 2Mz but not 5Mz and is intermittently failing. Have also had other PCs with intermittent Wifi problems. I'd suggest that some of the ghost connections are the "gremlins". social.technet.microsoft.com/Forums/office/en-US/… <- BY: Jeffrey Tibbett (MSFT)
    – DaaBoss
    Nov 14, 2021 at 16:21

3 Answers 3

18

Remove hidden adapter: Proposed solution:

Steps:

1) Remove adapter from: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkSetup2\Interfaces

2) use https://github.com/jschicht/RunAsTI to grand needed permissions

2
  • 4
    On the link there is also a mention of DeviceCleanup tool: uwe-sieber.de/misc_tools_e.html That gem solved the issue for me without messing with regedit and permissions. After removing all unused Realtech xxx adapters, I was able to rename my active adapter back to the original adapter name. No reboot was required.
    – broslav
    Feb 18, 2020 at 11:22
  • In my case, I did not have access to view (or even modify permissions) on this key within the registry. I was able to use the Device Manager method suggested by @yurtesen to remove the device.
    – D.N.
    May 6 at 19:00
18

There is a much easier way.

1- Open Device Manager and in View tab enable Show hidden devices.

2- Find the device linked to network interface you want to remove

3- Remove the device (it is not necessary to remove the drivers)

8
  • 1
    Unfortunately that didn't work for me (see original question)
    – matt.baker
    Aug 12, 2019 at 11:29
  • 1
    by far the most sensible approach
    – oldboy
    Sep 5, 2019 at 4:49
  • @matt.baker The article you linked is for devices not connected. It says that you need to enable the hidden devices option in Device Manager to see them. I did this in my machine and I could remove the devices and corresponding invisible network connections.
    – yurtesen
    Oct 6, 2019 at 19:11
  • It's not a device, so that would not work.
    – b01
    Jul 21, 2020 at 8:44
  • 1
    Network connections are through hardware aka. devices. You can't have an imaginary network connection. Even virtual machine network connections are over virtual network adapter devices.
    – yurtesen
    Jul 22, 2020 at 19:08
2

For wired connection:

Type the command

netsh lan show profiles, press Enter to obtain all wired network profiles.

netsh lan delete profile name="WiredProfileName"

For wireless connection:

Type the command

netsh wlan show profiles

netsh wlan delete profile name="WirelessProfileName"

Besides that, go into the following registry entryL

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles

Find those unused network profile by right pane profile name, delete them(GUID).

5
  • 2
    Thanks for the idea. Unfortunately it's not showing the hidden connections, just the ones already displayed in the Windows Network Connections UI
    – matt.baker
    Oct 11, 2017 at 9:17
  • were those wired or wireless network profile? Above netsh lan & netsh wlan would show all network profiles in your computer.
    – Waka
    Oct 12, 2017 at 3:12
  • These were wired connections. When I ran the netsh lan show profiles command it only showed Ethernet and Ethernet 2.
    – matt.baker
    Oct 12, 2017 at 5:36
  • 1
    go into the following registry entryL HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles Find those unused network profile by right pane profile name, delete them(GUID).
    – Waka
    Oct 12, 2017 at 5:55
  • 2
    Sorry for the delay in responding. The registry location you mention doesn't list the connections I mentioned unfortunately (only profiles). It seems bad practice just deleting a GUID as I cannot be sure it isn't referenced in another placed leading to broken links.
    – matt.baker
    Oct 18, 2017 at 11:43

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