Description
On Windows, a disabled network adapter is not listed by NetworkInterface.GetAllNetworkInterfaces().
Reproduction Steps
-
foreach (var ni in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces())
{
Console.WriteLine(ni.Name + ": " + ni.OperationalStatus);
}
- Disable a network adapter.
- Run the code again.
Expected behavior
The disabled adapter is listed with OperationalStatus.Down.
Actual behavior
The disabled adapter is not listed.
Regression?
No response
Known Workarounds
No response
Configuration
Windows 10
.NET 6 / .NET 7
Other information
No response
Description
On Windows, a disabled network adapter is not listed by
NetworkInterface.GetAllNetworkInterfaces().Reproduction Steps
Expected behavior
The disabled adapter is listed with
OperationalStatus.Down.Actual behavior
The disabled adapter is not listed.
Regression?
No response
Known Workarounds
No response
Configuration
Windows 10
.NET 6 / .NET 7
Other information
No response