{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.
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” + “R” keys to load the Run dialog box.
2. Type “devmgmt.msc” and press Enter.
3. Expand Network Adapters.
4. Right-click on the first "yellow exclamation mark" Wan Miniport device and choose Update Driver Software.
5. Select Browse my computer for driver software.
6. Select Let me pick from a list of device drivers on my computer.
7. Uncheck the Show compatible hardware checkbox.
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.
9. Select to anyway install the driver if asked.
10. Let Windows install the MAC bridge Miniport driver and chose Close.
11. Now under Network Adapters group, uninstall the recently installed MAC Bridge Miniport device.
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.
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. (https://www.redfox.bz/el/virtual-clonedrive.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
{Select Install this driver software anyway (if asked)}
(You should receive a successful installation message)
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)
{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.
- Netcfg -u MS_L2TP
- Netcfg -u MS_PPTP
- Netcfg -l %windir%\inf\netrast.inf -c p -i MS_PPTP
- 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.
We're hiring
We're looking for part-time or full-time technical writers to join our team! It's about a remote position that qualified tech writers from anywhere in the world can apply. Click here for more details.
Vince
October 19, 2021 @ 9:01 pm
Thanks worked great for me on my Windows10 machine, I was getting the error Unavailable – Device Missing and now its back.
Jason
September 17, 2021 @ 8:28 pm
HOW AM I SUPPOSED TO CONNECT TO THE INTERNET TO DOWNLOAD DEVCON.EXE IF YOU JUST HAD ME UNINSTALL ALL THE SOFTWARE THAT HELPS ME CONNECT TO THE INTERNET?!
lakonst
September 23, 2021 @ 3:42 pm
I do not say anywhere in the instructions to uninstall your network card.
Nuh
October 23, 2019 @ 7:01 am
Well i tried this for a client's computer and 5 months after the issue came back again exactly on the same date as well. Not quite too sure what happened. Lenovo Laptop running Win 7 Pro 64 bit in an AD environment connected to domain services.
Sedat Kumcu
October 12, 2019 @ 10:18 am
I have implemented the things that are said from the device administrator screen. Everything's okay. Thank you so much.
Jahboa
August 20, 2019 @ 9:49 pm
It worked for me (win7 ultimate x64 SP1).!
I had to repeat steps 1&2 to get rid of all drivers (second time I checked 'delete driver software' for MAC bridge; I just read that I shouldn't have, but it worked anyway)
I also had to be very careful to DL the right .cab file (8.1 for W7).
I still don't have my internet connection back, but at least my drivers at running.
Thanks!!
Teoatino
October 3, 2018 @ 10:53 pm
Hello.
I come to point 4.2 and here I get the error devcon.exe faild. And there is no Windows Security window I have strictly followed the instructions. I even tried various versions of devcon.exe (For 8, for 8.1 etc.) I have Windows 7 Pro
lakonst
October 4, 2018 @ 1:52 pm
@Teoatino: First of all make sure that you're running devcon.exe as Administrator. If the problem persists, then proceed and disable completely the driver signing
Teoatino
October 28, 2018 @ 4:51 pm
Hello.
I re-performed the procedure strictly in accordance with your instructions. I also tried the "test mode" to install the rodent. However, I will still stop at 4.2 (command: devcon.exe install c: \ Windows \ inf \ netavpna.inf MS_AgileVpnMiniport) and I already receive the information in the console: devcon.exe failed. I do not receive any Windows Security warning information. Maybe you can specify exactly what version of Windows should I choose devcon.exe from? The site is given only for Windows 8, 8.1, 10 (although the headers are written that also for 7). Any hint?
greetings
Windows 7 Pro
lakonst
October 29, 2018 @ 10:09 am
@Teoatino: Hello, the article is tested in Windows 7 Pro OS. Try to copy and paste the devcon.exe command in 'c:\windows\system32' folder.
Jordan Harnett
April 16, 2018 @ 7:45 pm
I get an error Devcon.exe is not recognisable as an internal or external command when entering into command prompt
lakonst
April 17, 2018 @ 9:20 am
Jordan Harnett: Follow the instructions (exactly) to install the "devcon.exe" utility.
ali
October 19, 2018 @ 6:03 pm
copy and paste the devcon.exe in windows/system32 folder
Amanda
April 12, 2017 @ 8:05 pm
Hi Trying to fix this problem. When I get to step 4.2, I get a devcon.exe failed message – any help?
lakonst
April 13, 2017 @ 9:48 am
@Amanda: Did you follow these instructions to download devcon utility?
dave
October 1, 2016 @ 12:46 pm
good morning lakonst. well things were looking good. completed everything and the "Driver Software Installation" window popped up and said all 6 were "Ready to use".
I then re-installed the dell driver and re-booted but still no connection…boo, hoo.
I checked Network Adapters and none of the wan miniports were listed…
the list of adapters is exactly the same as I mentioned in my previous post…
here is the list as they appeared in the "Driver Software Installation" window after I installed all of the wans again…
wan miniport (IPv6) #2
wan miniport (Network Monitor) #2
wan miniport (L2TP) #4
wan miniport (PPPOE) #4
wan miniport (PPTP) #4
wan miniport (IP) #2
as mentioned, all 6 had the green check mark "Ready to use"
and, back to you…
lakonst
October 1, 2016 @ 1:03 pm
@dave: Good Morning. I don't understand where is the problem now…Wan Miniport's are still missing or not? (View > Show hidden Devices).
dave
September 30, 2016 @ 8:19 pm
ok. vpn program uninstalled.
network diagnostics tool, "Troubleshooting couldn't identify the problem".
network adapters are as follows, (in order):
Bluetooth device, (Personal Area Network)
Bluetooth device, (RFCOMM Protocol TDI) #2
Dell Wireless 1703 802.11b/g/n (2.4GHz)
Realtek PCIe GBE Family Controller
then each of the wan drivers that successfully installed:
WAN Miniport (IP) #3
WAN Miniport (IPv6) #3
WAN Miniport (Network Monitor) #3
with all 3 having the yellow exclamation mark.
I will proceed with uninstalling the wans and you want me to uninstall the Dell Wireless 1703 driver?
lakonst
October 1, 2016 @ 7:14 am
@dave: Yes please try that. (Before uninstall download the driver from DELL). Maybe a Windows driver update has messed your WAN miniports.
dave
September 30, 2016 @ 4:55 pm
good morning lakonst. had some success. 50/50.
the following driver's did not install
wan miniport (ip) #3
wan miniport (ipv6) #3
wan miniport (network monitor) #3.
l2tp, pppoe and pptp installed fine and show "ready to use".
the above also had #3 at the end of the line.
I did take a screen shot of the cmd window just in case you wanted to see it but there doesn't seem to be a way to post it here.
thanks, dave.
lakonst
September 30, 2016 @ 6:08 pm
@dave: Ok, let's go step by step. 1. Do you have configured a vpn connection on the machine? If so, then delete it.
2. Run this Network Diagnosticks tool to see if it can fix your problem.
3. Which Network Adapters are listed in Device Manager? Uninstall the WiFi adapter and all Miniport Adapters (once again) and then reinstall it. (If you have an Intel WiFi adapter then use the Intel® Driver Update Utility)
AmirHossein
September 30, 2016 @ 12:16 am
I wanted to thank you for sharing my guide to download DevCon. And thank you for the fix to WAN miniport, I was looking for that BTW :)
lakonst
September 30, 2016 @ 10:27 am
@AmirHossein: Thank you for your effort to help us.
dave
September 29, 2016 @ 11:13 pm
hi lakonst. just ran the command. "Windows Resource Protection did not find any integrity violations."
lakonst
September 30, 2016 @ 10:25 am
@dave: Ok lets try that:
1. 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.
2. Then run all devcon commands as described in the the article, and tell me the results.
dave
September 29, 2016 @ 3:26 pm
good day lakonst. yes, I have been. I was successful in copying it to system 32 folder and then proceeded with the rest of the installation of the miniports but no luck. everything played out just as you described in your tutorial. I made sure each of my commands were typed correctly but after I re-booted and opened up network adapters, no wans were installed at all. I went back to "•devcon.exe install c:\Windows\inf\netavpna.inf MS_AgileVpnMiniport" and started over again, but still no luck.
and, over to you…lol.
lakonst
September 29, 2016 @ 5:14 pm
@dave: In device manager's main menu, go to Action > Scan for hardware changes. If nothing happens, then open command prompt with admin privileges and run: sfc /scannow
dave
September 28, 2016 @ 2:48 pm
ok. so far so good. I've successfully deleted all of the wan miniport drivers, downloaded the virtual clone program and found the devcon.exe file. when copying it over to the root directory, should it go into a specific folder or as a stand alone? I tried copying it as a stand alone but received an error message "0x80070522: A required privilege is not held by the client."
Thanks for your patience and help…
dave
lakonst
September 29, 2016 @ 9:21 am
@dave: (are you logged in as Administrator?) Try to copy devcon.exe to C:\Windows\System32 folder
dave
September 27, 2016 @ 1:09 pm
thanks lakonst for the clarification.
when "uninstall the recently installed MAC Bridge Miniport device.", should "Delete the driver software for this device" be checked or unchecked.
lakonst
September 27, 2016 @ 2:17 pm
@dave: Do not delete, just uninstall. (unchecked)
dave
September 25, 2016 @ 3:54 pm
good day. i'm looking at applying this tutorial to my problem but just wanted to know if this is for windows 10 or can be applied across various operating systems. I have windows 7 and while going through the tutorial and confirming the different links, found that the one link to microsoft's site was windows 10 specific.
thanks, dave.
lakonst
September 26, 2016 @ 1:12 pm
@dave: The tutorial is written for Windows 7 OS.
Martin Luksik
July 3, 2016 @ 9:10 am
Hello,
When I try to instal the MAC BRIDGE MINIPORT… an error with code 31 occures and the instalation is not finished so I cant move to next step of your manual…. Could you please help me out with it?
Thank you very much
Jason Kioke
June 4, 2016 @ 12:16 pm
I don't have MAC bridge miniport in my list
lakonst
June 5, 2016 @ 10:00 am
@Jason Kioke: (See the note) If MAC Bridge Miniport is unavailable, choose any other adapter.