Use commandline to show disabled network interfaces in windows? (Mobile Broadband and Regular Connections)

There are a few ways you can list network interfaces via commandline. For example:

netsh interface show interface
netsh interface ip show interfaces
ipconfig |findstr "adapter"

For Mobile Broadband Connections:

netsh mbn show interfaces

All of those will list network interfaces as long as they are enabled. If you disable an interface (ie 'netsh interface set interface "interfaceName" admin=disable'), it will no longer be listed with those commands.

My question is this: how do you list an interface that has been disabled? Something that works for Mobile Broadband connections as well as regular connections would be great.


Solution 1:

I found this command seems to work:

wmic nic get NetConnectionID

It shows regular connection interfaces including those that have been disabled however it only shows the name of the interface.

netsh interface show interface will show:

Admin State (Enabled or Disabled) State (Connected or Disconnected) Type: (Dedicated) And Interface Name : (local Area Connection or Wireless)

Solution 2:

Make sure that you are using an elevated command-prompt, otherwise it won’t have access to everything and may not be able to show disabled interfaces as expected (figure 1). For example, I was unable to use the admin=disable parameter from a non-elevated prompt.

Technically, it should still be able to read the NICs from a non-elevated prompt—I was able to see all interfaces (figure 2) including disabled ones—so your system may have some policies or something in place that prevents it from working from a non-elevated one.


Figure 1: Screenshot of elevated command prompt showing disabled interfaces

Screenshot of elevated command prompt showing disabled interfaces

Figure 2: Screenshot of non-elevated command prompt showing disabled interfaces

Screenshot of non-elevated command prompt showing disabled interfaces

Solution 3:

netsh interface ip show interfaces store=persistent will show some disabled interfaces (but it will not show some active ones). It seems that there are two interface "stores" - active, which contains active interfaces (including some that are not persistent and are probably recreated every time, like loopback), and persistent, which contains the inactive ones, but this is just my guessing