Get active network interface on Windows

Solution 1:

This command will provide a list of interfaces, with the connected or disconnected status:

c:\>netsh interface show interface

Admin State    State          Type             Interface Name
-------------------------------------------------------------------------
Enabled        Connected      Dedicated        Local Area Connection

Solution 2:

you can check more information about the connection using ipconfig /all. there are some other utilities are also available like netsh and netstat for other purpose..

enter image description here

If you are looking as coding perspective then you must look for some Windows API code from which you can create your own api that will help you get information on windows operating system.. you can use windows api or some created api in .net.. here is more information about these; if you are able to program for this..

here is some code snippet to get the all information about the network.. check these links. may be they can be included in vbscript. link1 link2 link3 link4

hope this help you...