Jump to content

Recommended Posts

Posted (edited)

This info can also be found via WMI.

http://msdn.microsoft.com/en-us/library/aa394220(VS.85).aspx

$host = "."
$objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & $host & "\root\cimv2")
$colItems = $objWMIService.ExecQuery ("SELECT * from Win32_NetworkConnection")
$conn = 0
For $objItem in $colItems
    $conn += 1
    $info = "Name: " & $objItem.Name & @CRLF & "ConnectionState: " & $objItem.ConnectionState & @CRLF & "ConnectionType: " & $objItem.ConnectionType & @CRLF & "LocalName: " & $objItem.LocalName & @CRLF & "RemotePath: " & $objItem.RemotePath
    msgbox(0,"MAP " & $conn,$info)
Next
Edited by spudw2k

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...