I want the vbscrip to query wmi for the NetConnectionStatus name who's NetConnectionStatus = 2 (connected). And store that name into a variable.
Here's the two queries I just don't know how to loop them
SELECT NetConnectionStatus FROM Win32_NetworkAdapter
I want it to look for where value = 2
SELECT NetConnectionID FROM Win32_NetworkAdapter
Should be local area connection 1 or 2.