0XC023002E

Fix STATUS_NDIS_INVALID_PORT_STATE 0xC023002E Error

Network & Connectivity Intermediate 👁 0 views 📅 May 27, 2026

This error hits when Windows can't use a network port because the Hyper-V virtual switch blocked it. Fix it by resetting the virtual switch or disabling VMQ.

When This Error Hits

You're on Windows 10 or 11, maybe after a system update or after installing Docker Desktop with Hyper-V. Or maybe you just enabled Windows Sandbox. Suddenly your Ethernet or Wi-Fi shows "No internet" or "Unidentified network". You open Event Viewer and see STATUS_NDIS_INVALID_PORT_STATE (0xC023002E) on the network adapter. Or a VM you run can't connect to the network. The error means the Hyper-V virtual switch claimed the physical port but never released it properly.

I see this most often when a user enables or disables the Hyper-V role, or when a third-party VPN client like Cisco AnyConnect or NordVPN interacts badly with the Hyper-V extensible switch.

Root Cause

The NDIS (Network Driver Interface Specification) layer manages how network drivers talk to each other. When Hyper-V is active, it creates a virtual switch that binds to your physical NIC. That switch assigns a "port" for each virtual machine or host connection. Sometimes that port gets stuck in an invalid state—like it's half-configured or the switch didn't clean up after a VM shut down.

Your physical network adapter is still there. It's enabled. But the Hyper-V switch won't let traffic flow through that port. The error code 0xC023002E literally means "invalid port state"—the port exists but it's not ready to send or receive data. It's a software lock, not a hardware failure.

How to Fix It

I'll give you the fix that works in 90% of cases. Try these steps in order. Don't skip the reboot—it matters.

Step 1: Reset the Hyper-V Virtual Switch

  1. Open PowerShell as Administrator. Right-click Start and select "Windows PowerShell (Admin)" or "Terminal (Admin)".
  2. Type this command and press Enter:
    Get-VMSwitch | Disable-VMSwitch
    After you press Enter, you should see a list of virtual switches, each one will show "Disabled" in the State column. Your internet will drop immediately—that's normal.
  3. Now re-enable the switches:
    Get-VMSwitch | Enable-VMSwitch
    You'll see each switch change to "Enabled".
  4. Close PowerShell and restart your computer. Yes, you need to reboot—the switch needs a clean start.

After the reboot, check your network adapter. If the error is still there, move to step 2.

Step 2: Disable Virtual Machine Queue (VMQ) on the Adapter

VMQ is a feature that lets the network adapter send packets directly to the Hyper-V virtual machine. It's often the culprit when ports get stuck. Disabling it usually clears the error.

  1. Open Device Manager. Press Win + X and select "Device Manager".
  2. Expand "Network adapters". Find your physical NIC—it's usually the one with a name like "Intel(R) Ethernet Connection I219-V" or "Realtek PCIe GbE Family Controller". Don't pick the Hyper-V Virtual Ethernet Adapter.
  3. Right-click that adapter and select "Properties".
  4. Go to the "Advanced" tab.
  5. Look for a setting called "Virtual Machine Queue" or "VMQ". It's often near the bottom of the list.
  6. Change the value from "Enabled" to "Disabled".
  7. Click OK. Your network might disconnect for a few seconds. After that, close Device Manager.
  8. Restart your computer again.

When Windows comes back, the error should be gone. I've seen this fix work on Dell, HP, and Lenovo laptops with Realtek and Intel NICs on Windows 10 22H2 and Windows 11 23H2.

Step 3: Remove and Re-add the Hyper-V Virtual Switch (If Still Broken)

If steps 1 and 2 didn't work, the virtual switch itself might be corrupted. You'll remove it and let Windows recreate it.

  1. Open PowerShell as Administrator.
  2. List your virtual switches:
    Get-VMSwitch
    Note the name of the switch (like "Default Switch" or "DockerNAT").
  3. Remove the default switch (replace "Default Switch" with your actual switch name):
    Remove-VMSwitch -Name "Default Switch" -Force
    You won't see a confirmation—that's fine.
  4. Close PowerShell and restart your computer.
  5. After the reboot, Windows automatically recreates the default Hyper-V switch. Check your network.

If It Still Fails

Sometimes the problem is a third-party network filter driver. Things like Cisco AnyConnect, NordVPN, or even older antivirus software (looking at you, Avast) install NDIS filter drivers that conflict with Hyper-V. Uninstall the VPN client or antivirus completely, then reboot. If your network works after that, you found the conflict. You can reinstall the software—just make sure it's the latest version.

Also check if you have multiple network adapters (like both Wi-Fi and Ethernet). Disable one in Control Panel > Network and Sharing Center > Change adapter settings. Right-click the adapter and select "Disable". Then enable it again. I've seen a dual-adapter setup confuse the virtual switch.

One more thing: update your network adapter driver. Go to the manufacturer's website (Intel, Realtek, or your laptop vendor) and download the latest driver. Don't trust Windows Update for this—the OEM driver is often newer. Install it, reboot, and test.

If none of that works, you might need to completely disable Hyper-V. Open PowerShell as Admin and run:

Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
Then reboot. That removes the virtual switch entirely. If your network works after that, you know Hyper-V was the problem. You can re-enable Hyper-V later with Enable-WindowsOptionalFeature—just be ready to repeat these steps if the error comes back.

Quick tip: If you're in a hurry, try the VMQ disable first (Step 2). It's the fastest fix that works most of the time. The virtual switch reset takes longer but is more thorough.

Was this solution helpful?