{FIX} Error Code 31 at WAN Miniport in Device Manager (Device is not working properly).

WAN Miniport Yellow exclamation mark on Device Manager means that the corresponding miniport driver cannot be loaded by Windows (Code 31). When Code 31 error occurs on a WAN miniport adapter, then, at the device's status, you will receive the following error message: "This device is not working properly because Windows cannot load the drivers required for this device. (Code 31)".

Wan network miniport drivers are Windows hardware drivers, which are commonly used by VPΝ and other network services. The WAN miniport drivers are hidden in device manager, but if they have problems (e.g. if they haven't been correctly installed or their drivers are corrupted) are displayed with a yellow exclamation sign under Network Adapters group. In this case you have to uninstall and re-install them, in order to work properly.

fix WAN Miniport Yellow exclamation code 31

WAN Miniport uninstall and re-install is a little difficult and tricky, so I wrote this article on how to accomplish this task easily.


How to fix WAN Miniport Yellow exclamation mark (Code 31) in Device Manager.

Step 1. Uninstall WAN Miniport Drivers.

To uninstall yellow marked WAN Miniport from your computer:

1. Press “Windows”  Image-201_thumb8_thumb4  + “R” keys to load the Run dialog box.

2. Type “devmgmt.msc” and press Enter.

code 31 WAN miniport fix

3. Expand Network Adapters.

4. Right-click on the first "yellow exclamation mark" Wan Miniport device and choose Update Driver Software.

uninstall WAN Miniport


5. Select Browse my computer for driver software.

uninstall WAN Miniport1

6. Select Let me pick from a list of device drivers on my computer.

uninstall WAN Miniport2


7. Uncheck the Show compatible hardware checkbox.

uninstall WAN Miniport4


8. At Manufacturer pane select Microsoft and at Network Adapter pane select MAC Bridge Miniport. * Click Next.

* Note: If MAC Bridge Miniport is unavailable, choose any other adapter.

WAN Miniport code 31

9. Select to anyway install the driver if asked.

WAN Miniport yellow mark sign


10. Let Windows install the MAC bridge Miniport driver and chose Close.

mac bridge miniport

11. Now under Network Adapters group, uninstall the recently installed MAC Bridge Miniport device.

mac bridge miniport

12. Then proceed and perform the same operation (Update Driver & Uninstall) to every WAN miniport adapter that has a yellow exclamation sign next to it.

13. When done with all WAN Miniport drivers removal, restart your computer (important).


Step 2. Ensure that all WAN miniport adapters are removed from your system.

Now ensure that all WAN miniport adapters are completely removed from the current configuration. To do that:

1. Go to Start > All Programs > Accessories.

2. Right click at Command Prompt and select Run as Administrator.

command prompt admin


3. At the command prompt, execute the following commands one by one:

Note: If you receive a message that the corresponding device is not installed, then ignore the message and when you finish with all commands, proceed to the next step.

  • Netcfg -u MS_AgileVpn
  • Netcfg -u MS_NdisWanIp
  • Netcfg -u MS_NdisWanIpv6
  • Netcfg -u MS_L2TP
  • Netcfg -u MS_NdisWanBh
  • Netcfg -u MS_Pppoe
  • Netcfg -u MS_PPTP
  • Netcfg -u MS_Sstp

4. When done, restart the computer


Step 3. Get Device Console utility (devcon.exe) to re-install WAN miniport.

To re-install WAN Miniport adapter you need to obtain the Windows Device Console utility (devcon.exe).

(Device Console utility, is a command-line tool that displays detailed information about devices on Windows computers and can be used also to enable, disable, install, configure, and remove devices. Device Console utility is included in Windows Driver Kit (WDK) which can be downloaded from here. Instructions on how to obtain the current version of Device Console Utility can be found here.) *

Recently I found that Device Console utility (devcon.exe) is also included inside the Virtual Clone Drive program, which is used to mount ISO files. So, instead of downloading the whole WDK package I downloaded & installed the Virtual Clone Drive program and then I used the "devcon.exe" command found on the program's installation folder to install all WAN Miniport adapters easy. So:

1. Download & install Virtual Clone Drive. (http://www.slysoft.com/en/download.html).

2. When the installation is completed, navigate to "C:\Program Files\Elaborate Bytes\VirtualCloneDrive" folder and copy the "devcon.exe" file to the root folder of disk C:\.

* Update (September 2016): You can download the devcon.exe by following the instructions on this post: How to obtain Device Console Utility (DevCon.exe) without downloading and installing the entire Windows Driver Kit.


Step 4. Use devcon.exe to install WAN miniport drivers.

Now lets go on to install all needed WAN Miniport drivers by using the devcon.exe utility.

1. Run Command Prompt as Administrator.

2. Navigate to the root folder of disk C: (cd\) and execute the following command to install the WAN Miniport (IKEv2) driver:

  • devcon.exe install c:\Windows\inf\netavpna.inf MS_AgileVpnMiniport

devcon usage


{Select Install this driver software anyway (if asked)}

devcon WAN Miniport installation


(You should receive a successful installation message)

install WAN Miniport


3. Now execute the following commands in order to install the rest WAN miniport drivers:

Attention: You should receive a "devcon.exe failed" message on almost any given of the commands below, but don't worry…all the WAN miniport drivers will be installed successfully after the computer restart.

{To install the WAN Miniport (IP) driver}

  • devcon.exe install c:\Windows\inf\netrasa.inf MS_NdisWanIp

(WAN Miniport installation failed message. Ignore it and continue to the next commands)

installation WAN Miniport


{To install the WAN Miniport (IPv6) driver}

  • devcon.exe install c:\Windows\inf\netrasa.inf MS_NdisWanIpv6

{To install the WAN Miniport (Network Monitor) driver}

  • devcon.exe install c:\Windows\inf\netrasa.inf MS_NdisWanBh

{To install the WAN Miniport (L2TP) driver}

  • devcon.exe install c:\Windows\inf\netrasa.inf MS_L2tpMiniport

{To install the WAN Miniport (PPPOE) driver}

devcon.exe install c:\Windows\inf\netrasa.inf MS_PppoeMiniport

{To install the WAN Miniport (PPTP) driver}

  • devcon.exe install c:\Windows\inf\netrasa.inf MS_PptpMiniport

{To install the WAN Miniport (SSTP) driver}

  • devcon.exe install c:\Windows\inf\netsstpa.inf MS_SstpMiniport

4. When done, restart your computer.

Upon restart if you navigate to the device manager (with hidden devices enabled) you should see all the WAN Miniport adapters installed.



Additional Help: If you cannot install "WAN Miniport (L2TP)" & "WAN Miniport (PPTP)" by using the above procedure, then open a command prompt as admin and execute the following commands in order. Then restart your computer.

  1. Netcfg -u MS_L2TP
  2. Netcfg -u MS_PPTP
  3. Netcfg -l %windir%\inf\netrast.inf -c p -i MS_PPTP
  4. Netcfg -l %windir%\inf\netrast.inf -c p -i MS_L2TP


That's it! Let me know if this guide has helped you by leaving your comment about your experience. Please like and share this guide to help others.

If this article was useful for you, please consider supporting us by making a donation. Even $1 can a make a huge difference for us in our effort to continue to help others while keeping this site free: