'This script will return a workstations network properties similar to ipconfig. 'It will also display mapped network drives. 'NOTE: This script must be run locally '**Start Encode** Dim strComputer, CRLF Dim colDrives, strMsg Dim WSHNetwork strComputer = "." CRLF = Chr(13) & Chr(10) Set NetworkPROP = WScript.CreateObject("WScript.Network") Set objWMIService = GetObject _ ("winmgmts:" & "!\\" & strComputer & "\root\cimv2") Set colAdapters = objWMIService.ExecQuery _ ("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled = True") For Each objAdapter in colAdapters Msgbox "UserName " &Chr(9) & "=" & NetworkPROP.UserName & CRLF & _ "Host name: " &Chr(9) & "=" & objAdapter.DNSHostName & CRLF & _ "IP address: " &Chr(9) & "=" & objAdapter.IPAddress(i) & CRLF & _ "Description: " &Chr(9) & "=" & objAdapter.Description & CRLF & _ "User Domain: " &Chr(9) & "=" & NetworkPROP.UserDomain & CRLF & _ "Physical address: " &Chr(9) & "=" & objAdapter.MACAddress & CRLF & _ "DHCP enabled: " &Chr(9) & "=" & objAdapter.DHCPEnabled, _ vbinformation + vbOKOnly + vbmsgboxsetforeground, _ "Network Properties" Next Set colDrives = NetworkPROP.EnumNetworkDrives 'If there are no mapped drives then inform user, else display 'mapped drives If colDrives.Count = 0 Then MsgBox "There are no drives to enumerate.", _ vbInformation + vbOkOnly, _ L_Welcome_MsgBox_Title_Text Else strMsg = "Current network drive connections: " & CRLF For i = 0 To colDrives.Count - 1 Step 2 strMsg = strMsg & CRLF & colDrives(i) & Chr(9) & colDrives(i + 1) Next MsgBox strMsg, _ vbInformation + vbOkOnly, _ "Mapped Network Drives" End If