Contact Info

Crumbtrail

ActiveXperts.com » Administration » Scripts » VBScript » Custom script

List Mapped Network Drives

You can use any of the VBScript programs below in ActiveXperts Network Monitor. Click here for an explanation about how to include scripts in ActiveXperts Network Monitor.

Example(s)

On Error Resume Next

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * from Win32_MappedLogicalDisk")

For Each objItem in colItems
    Wscript.Echo "Compressed: " & objItem.Compressed
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "Device ID: " & objItem.DeviceID
    Wscript.Echo "File System: " & objItem.FileSystem
    Wscript.Echo "Free Space: " & objItem.FreeSpace
    Wscript.Echo "Maximum Component Length: " & objItem.MaximumComponentLength
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "Provider Name: " & objItem.ProviderName
    Wscript.Echo "Session ID: " & objItem.SessionID
    Wscript.Echo "Size: " & objItem.Size
    Wscript.Echo "Supports Disk Quotas: " & objItem.SupportsDiskQuotas
    Wscript.Echo "Supports File-Based Compression: " & _
        objItem.SupportsFileBasedCompression
    Wscript.Echo "Volume Name: " & objItem.VolumeName
    Wscript.Echo "Volume Serial Number: " & objItem.VolumeSerialNumber
    Wscript.Echo
Next