Windows Command Line - List Network Adapter Components
Solution 1
Powershell:
Get-NetAdapterBinding -IncludeHidden -AllBindings
VBScript (using WMI):
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\StandardCimv2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM MSFT_NetAdapterBindingSettingData",,48)
Wscript.Echo "Name,DisplayName,ComponentId,Enabled"
For Each objItem in colItems
Wscript.Echo objItem.Name & "," & objItem.DisplayName & "," & objItem.ComponentId & "," & objItem.Enabled
Next
WMIC:
wmic /namespace:\\root\StandardCimv2 Path MSFT_NetAdapterBindingSettingData Get Name,DisplayName,ComponentId,Enabled
Solution 2
How do I get a list of the components used by each network adapter on the system.
You can use nvspbind (a Microsoft Technet application) to retrieve exactly the information you are asking for.
nvspbind is a tool for modifying network bindings from the command line. It is especially useful in Server Core environments with the Hyper-V role enabled.
...
There are three variations:
Microsoft_Nvspbind_package.EXE is the standard 64 bit version for server core.
32bit_Nvspbind_package.EXE is a 32 bit version that works on Vista and newer.
XP_Nvspbind_package.EXE is a reduced functionality 32 bit version that works on XP and newer.
Source Hyper-V Network VSP Bind (nvspbind)
I've tested the Microsoft_Nvspbind_package.EXE version on Windows 7 64 bit with the following results:
F:\temp>nvspbind.exe "Local Area Connection 2" > lan2.txt
F:\temp>type lan2.txt
Hyper-V Network VSP Bind Application 6.1.7725.0.
Copyright (c) Microsoft Corporation. All rights reserved.
Adapters:
{37C93C8F-EE9C-4268-A33F-DD199D18748E}
"usb\class_e0&subclass_01&prot_03"
"Remote NDIS based Internet Sharing Device"
"Local Area Connection 2":
enabled: ms_netbios (NetBIOS Interface)
disabled: ms_server (File and Printer Sharing for Microsoft Networks)
enabled: ms_pacer (QoS Packet Scheduler)
disabled: ms_ndiscap (NDIS Capture LightWeight Filter)
enabled: ms_wfplwf (WFP Lightweight Filter)
enabled: inspect (COMODO Internet Security Firewall Driver)
disabled: ms_msclient (Client for Microsoft Networks)
enabled: ms_tcpip6 (Internet Protocol Version 6 (TCP/IPv6))
enabled: ms_netbt (WINS Client(TCP/IP) Protocol)
enabled: ms_smb (Microsoft NetbiosSmb)
enabled: ms_tcpip (Internet Protocol Version 4 (TCP/IPv4))
enabled: ms_lltdio (Link-Layer Topology Discovery Mapper I/O Driver)
enabled: ms_rspndr (Link-Layer Topology Discovery Responder)
enabled: ms_pppoe (Point to Point Protocol Over Ethernet)
enabled: ms_ndisuio (NDIS Usermode I/O Protocol)
cleaning up...finished (0)
F:\temp>
Related videos on Youtube
GT500
Updated on September 18, 2022Comments
-
GT500 over 1 year
I'm looking for a way to, in a batch file, get a list of the components (such as NDIS drivers) in use by each network adapter on the system. Here's a screenshot of the info I want in the network adapter properties:
Screenshot of network adapter properties:
I have looked through a lot of the data I can get from WMIC, and while I can find a lot of network adapter information I'm not able to find exactly what I'm looking for.
Is anyone aware of a way to get this information from the regular Windows command line without using third-party utilities?
-
Argonauts about 8 yearsI would go the powershell route for the wide ranging configuration info you are looking for. netsh could likely get you close if the 'DOS' cmd line is a requirement, but for the level of integrated info you are looking for you are best off (imho) using the tool specifically designed for that type of task (disclaimer - not a huge fan of powershell): See blogs.technet.microsoft.com/wincat/2012/08/27/…
-
GT500 about 8 yearsUnfortunately I am not familiar with PowerShell. I also can't be certain that users have it before they run the script, and I would like it to be dependency-free for simplicity. Also, I can't find any parameters for netsh that will display the information I am looking for.
-
-
GT500 about 8 yearsnvspbind does look like the output would work for my purposes. Unfortunately it would require my batch file to have a dependency, and I don't want to have to ask users to install something before they run the batch file.
-
DavidPostill about 8 years@GT500 I don't think there is a "built-in" solution to achieve what you want :/
-
GT500 over 4 yearsWow, that WMIC command works. Thanks.