Windows batch command to display all network connections?
See this Windows script : List Items in the Network Connections Folder:
Const NETWORK_CONNECTIONS = &H31;&
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(NETWORK_CONNECTIONS)
Set objFolderItem = objFolder.Self
Wscript.Echo objFolderItem.Path
Set colItems = objFolder.Items
For Each objItem in colItems
Wscript.Echo objItem.Name
Next
Description: Reports the path to the Network Connections folder, and then lists any items found in that folder. For Windows NT 4.0 and Windows 98, this script requires Windows Script Host 5.1 and Internet Explorer 4.0 or later.
Related videos on Youtube
Ken Paul
Updated on September 17, 2022Comments
-
Ken Paul over 1 year
What Windows (preferably XP) batch command will list all of the network connections that appear in the Network Connections dialog? I've tried
RASDIAL
,IPCONFIG
,NETSTAT
, andNET
commands with various option combinations, but they only seem to show those that are actually connected. I want to see the ones not connected as well.CLARIFICATION: I want to be able to see dialups, wireless, firewire, LAN, miniport, VPN, etc. connections whether connected, disconnected, disabled, etc. just like in the Network Connections dialog.
-
RohitS over 14 yearsWhat "connections"? Maybe clarify? Physical? Logical? ipconfig /all displays physical, while netstat -a will display logical port connections.
-
-
Ken Paul over 14 yearsNope. At the moment, Network Connections shows 1 Internet Connection, 5 LAN connections, and 1 VPN connection.
ipconfig /all
shows only the 3 connections that are actively connected. -
Ken Paul over 14 yearsnetsh shows almost everything, but not the VPN connection.
-
dolmen about 13 yearsThe link does not apply anymore. :(
-
harrymc about 13 years@dolmen: It worked for me just now.
-
Neeraj about 5 years@harrymc That link seems to be broken. Can you please (if possible) post the script here? Or are you aware of any other solution(s) by now?
-
harrymc about 5 years@baburao: Link replaced from the Wayback Machine and script copied into the answer. Remember that this is a very old post and answer.