Code 31 error in Device Manager for WAN Miniport (Network monitor) device in Windows 8 or Windows Server 2012
This article provides a workaround for an issue where Device Manager displays a yellow exclamation mark next to the WAN Miniport (Network monitor) device.
Original product version: Windows 10 - all editions, Windows Server 2012 R2
Original KB number: 2871372
Consider the following scenario:
- You install Windows 8 or Windows Server 2012.
- You open Device Manager after the installation is complete.
In this scenario, Device Manager displays a yellow exclamation mark next to the WAN Miniport (Network monitor) device. Additionally, the Details tab of the device properties window displays the following message:
The device is not working properly because Windows cannot load the drivers required for this device. (Code 31)
This issue occurs because Windows cannot load the drivers that are required for the WAN (Network monitor) device. Because there is no driver associated with the device, it cannot be removed from Device Manager.
To prevent this issue during future installs, you must integrate update 2822241 into the installation media that you use during setup.
For information about how to use Deployment Image Servicing and Management (DISM) to integrate a hotfix package into installation media, see Add or remove packages offline.
If you have already installed the operating system and are currently receiving a "code 31" error on the WAN Miniport (Network Monitor) device, follow these steps:
- Open Device Manager.
- Right-click the WAN miniport (Network monitor) device, and then click Update Driver Software.
- Click Browse my computer for driver software.
- Click Let me pick from a list of device drivers on my computer.
- Clear the Show compatible hardware check box.
- In the column on the left side, select Microsoft, and in the column on the right side, select Microsoft KM-TEST Loopback Adapter.
- In the Update Driver Warning dialog box, click Yes to continue installing this driver.
- After the driver is installed, right-click the device, and then click Uninstall.
- After the device is uninstalled, right-click the computer name in Device Manager, and then click Scan for hardware changes.
- On the View menu, click Show hidden devices. The WAN Miniport (Network monitor) device should now be started and no longer have a yellow exclamation mark next to it.