Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / How to Remove Hidden/Ghost Network Adapters in Windows

June 8, 2023 PowerShellWindows 10Windows 11Windows Server 2019

How to Remove Hidden/Ghost Network Adapters in Windows

When replacing a motherboard or a network card, during a P2V or cold migration of virtual machines between hypervisors, or when configuring multiple VLANs on a single NIC in Windows, you can come across a problem of hidden (ghost) network adapters. In this case, you cannot set the previously assigned static IP address for a new network adapter with the error The IP address you have entered for this network adapter is already assigned to another adapter.

Windows automatically hides the devices that are present in Windows configuration but are not physically connected to the computer. A hidden network adapter in Windows remains if you physically disconnect the previously installed network card (this can be either a physical NIC or a virtual network adapter). The previously installed network card becomes hidden and you cannot see it in the Device Manager.

Contents:
  • The IP Address is Already Assigned to Another Network Adapter
  • Show Hidden (Non-Existent) Network Adapters in Windows Device Manager
  • How to Remove Hidden/Non-Present Network Adapters with PowerShell and CMD?
  • Remove Network Adapter Settings from the Registry

The IP Address is Already Assigned to Another Network Adapter

The main problem with hidden network adapters is that you cannot assign an IP address of your old network adapter to a new network interface. When you try to assign the old IP address, the following error appears:

Microsoft TCP/IP
The IP address <IP address> you have entered for this network adapter is already assigned to another adapter (Intel Gigabit Network Connection) which is no longer present on the computer. If the same address is assigned to both adapters and they both become active, only one of them will use this address. This may result in incorrect system configuration.
Do you want to fix the problem by entering a different IP address for this adapter in the list of IP addresses in the Advanced dialog box?

The IP address you have entered for this network adapter is already assigned to another adapter

If you try to set the network adapter’s IP address using PowerShell, an error will appear:

New-NetIPAddress –IPAddress 192.168.10.155 -DefaultGateway 192.168.10.1 -PrefixLength 24 -InterfaceIndex 22

New-NetIPAddress : The object already exists.
Windows System Error 5010,New-NetIPAddress

I often come across this issue in VMware virtual machines with a VMXNet3 virtual network adapter. A new virtual NIC card is identified as a new device (unlike vNIC type E1000). If you have removed a network card (vNIC) on a VMWare virtual machine and added a new one, you won’t be able to set your old IP address assigned to the removed network interface.

Also, the problem of hidden network adapters appears after migrating a physical server to a VM (Physical-to-Virtual — P2V), for example, using the VMware Converter. After migration, disabled NICs remain in Windows and you cannot assign old IP address settings to new vNICs.

Prior to assigning an old IP address to a new network adapter, you must remove the configuration of disconnected NICs.

Show Hidden (Non-Existent) Network Adapters in Windows Device Manager

To show hidden (physically disconnected) network adapters in Windows, open the Device Manager console in a special mode. To do this on Windows 7 (and previous versions):

  1. Open the command prompt as an administrator;
  2. Run the command: set devmgr_show_nonpresent_devices=1
  3. Start the Device Manager console: devmgmt.msc

In the top menu, click View -> Show hidden devices.

devmgr_show_nonpresent_devices

Expand the Network adapters section. Hidden network cards should appear in the list (they have pale icons). Select the network controller you want to remove, right-click it -> Uninstall Device. You can remove the network adapter driver by checking the Delete the driver software for this device option.

ghost (hidden) network adapter on windows

How to Remove Hidden/Non-Present Network Adapters with PowerShell and CMD?

You can list unused/hidden network adapters in Windows using PowerShell:

Get-PnpDevice -class net | ? Status -eq Unknown | Select FriendlyName,InstanceId

Then you can remove such a network adapter by its InstanceId (copy its value from the previous command result):

$InstanceId = “PCI\VEN_8086&DEV_10D3&SUBSYS_07D015AD&REV_00\000C29FFFF66A80700”
$RemoveKey = "HKLM:\SYSTEM\CurrentControlSet\Enum\$InstanceId"
Get-Item $RemoveKey | Select-Object -ExpandProperty Property | %{ Remove-ItemProperty -Path $RemoveKey -Name $_ -Verbose}

powershell: Get-PnpDevice show hidden NICs

You can remove all hidden (non-present) network adapters using a PowerShell script:

$Devs = Get-PnpDevice -class net | ? Status -eq Unknown | Select FriendlyName,InstanceId
ForEach ($Dev in $Devs) {
$RemoveKey = "HKLM:\SYSTEM\CurrentControlSet\Enum\$($Dev.InstanceId)"
Get-Item $RemoveKey | Select-Object -ExpandProperty Property | %{ Remove-ItemProperty -Path $RemoveKey -Name $_ -Verbose }}

You can use the DevCon.exe (Device Console) tool to remove devices in Windows. This tool is part of the Windows Driver Kit (WDK).

List all network adapters:

devcon findall =net

Copy the Device Instance ID of the network adapter you want to remove and run the command:

devcon -r remove '@PCI\VEN_8086&DEV_10D3&SUBSYS_07D015AD&REV_00\000C29FFFF66A80700'

Please note that you need to specify the @ symbol before the device ID.

devcon: remove ghost network adapter on windows

The list contains WAN Miniport virtual network adapters (without which you won’t be able to connect to the remote VPN device), Microsoft Hosted Network (used to create a WiFi hotspot on Windows), Microsoft Wi-Fi Direct virtual adapter, etc. We do not recommend deleting them if they work properly.

On Windows 10/11 and Windows Server 2022/2019/2016, you can use the PnPUtil built-in command instead of the devcon.exe.

List network adapters:

pnputil /enum-devices /class net

pnputil: enum-devices class network

To remove a device by its InstanceID:

pnputil /remove-device "PCI\VEN_8086&DEV_10D3&SUBSYS_07D015AD&REV_00\000C29FFFF66A80700"

pnputil remove ghost network adapter on windows 11

Open the Device Manager, select Actions -> Scan for hardware changes from the menu and check that the hidden network adapter has been removed.

windows device manager: scan for hardware changes

Remove Network Adapter Settings from the Registry

If after removing the ghost NIC in the Device Manager you still cannot assign the old IP address to a new adapter, remove the IP configuration of the old NIC from the registry.

The IP settings of your network interfaces are located under the registry key HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces.

This registry key contains some {Interface GUID} keys. Check them one by one until you find the interface, which IPAddress value contains the IP address assigned to the old network interface.

The IPAddress parameter may contain more than one IP address since in Windows you can assign multiple IP addresses (aliases) to a single network adapter.

remove old non-existent network adapter from registry

Remember the name of the registry key (it is the identifier of the network adapter). Remove the keys:

  • HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Adapters\{your_NIC_ID}
  • HKLM\SYSTEM\CurrentControlSet\Services\{your_NIC_ID}
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network{your_NIC_ID}

Restart your computer and try to assign the old static IP address to a new network adapter.

It is also recommended to reset the network settings. In Windows 10 and 11, you can do it in Settings -> Network and Internet -> Network Reset.

windows 10 reset network

Resetting network settings will also help you if network adapters are not showing up in Windows.

If you face a problem after you installed an additional network card on your computer, make sure that the built-in LAN interface is disabled in BIOS/UEFI settings (the item is usually called Onboard Gbit NIC or Onboard LAN).

1 comment
8
Facebook Twitter Google + Pinterest
previous post
Shutdown/Restart Windows using Command Prompt and PowerShell
next post
Fix: The Requested Certificate Template is Not Supported by This CA

Related Reading

How to Connect VPN Before Windows Logon

November 14, 2023

Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

November 7, 2023

Send Emails with Microsoft Graph API and PowerShell

November 6, 2023

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

1 comment

Ricardo September 27, 2022 - 12:44 pm

God bless you

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • How to Connect VPN Before Windows Logon

    November 14, 2023
  • Removing Azure Arc Setup Feature on Windows Server 2022

    November 9, 2023
  • Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

    November 7, 2023
  • Send Emails with Microsoft Graph API and PowerShell

    November 6, 2023
  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Fix: Remote Desktop Licensing Mode is not Configured
  • Manage Windows Updates with PSWindowsUpdate PowerShell Module
  • Configuring Port Forwarding in Windows
  • Start Menu or Taskbar Search Not Working in Windows 10/11
  • How to Install Remote Server Administration Tools (RSAT) on Windows
  • How to Delete Old User Profiles in Windows
  • Get-ADUser: Find Active Directory User Info with PowerShell
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top