18

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.

13

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

| improve this answer | |
  • 1
    Thanks! This WORKED!! – baburao Jun 10 '19 at 12:58
  • 3
    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 at 11:22
5

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)

| improve this answer | |
  • 1
    Unfortunately that didn't work for me (see original question) – matt.baker Aug 12 '19 at 11:29
  • 1
    by far the most sensible approach – oldboy Sep 5 '19 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 '19 at 19:11
  • It's not a device, so that would not work. – b01 Jul 21 at 8:44
  • 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 at 19:08
1

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).

| improve this answer | |
  • 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 '17 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 '17 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 '17 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 '17 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 '17 at 11:43

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