Mapped logical disks are network mapped drives you access from a local computer as if they were local storage devices. For example, a network share used in common by every computer in a network might be mapped to your Z: drive and act as if it were a local drive.
Using the Win32_MappedLogicalDisk WMI class we can access the mapped logical drives on a local computer.
From MSDN:
The Win32_MappedLogicalDisk WMI class represents network storage devices that are mapped as logical disks on the computer system.
Sample usage
This function will iterate through all the available properties for each mapped drive on a local computer.
Function GetMappedDisksInfo()
Dim objWMI As Object
Dim disks As Object
Dim disk As Object
Set objWMI = GetWMIService
Set disks = objWMI.ExecQuery("Select * from Win32_MappedLogicalDisk")
For Each disk In disks
Debug.Print disk.Access
Debug.Print disk.Availability
Debug.Print disk.BlockSize
Debug.Print disk.Caption
Debug.Print disk.Compressed
Debug.Print disk.ConfigManagerErrorCode
Debug.Print disk.ConfigManagerUserConfig
Debug.Print disk.CreationClassName
Debug.Print disk.Description
Debug.Print disk.DeviceID
Debug.Print disk.ErrorCleared
Debug.Print disk.ErrorDescription
Debug.Print disk.ErrorMethodology
Debug.Print disk.FileSystem
Debug.Print disk.FreeSpace
Debug.Print disk.InstallDate
Debug.Print disk.LastErrorCode
Debug.Print disk.MaximumComponentLength
Debug.Print disk.Name
Debug.Print disk.NumberOfBlocks
Debug.Print disk.PNPDeviceID
Debug.Print disk.PowerManagementCapabilities
Debug.Print disk.PowerManagementSupported
Debug.Print disk.ProviderName
Debug.Print disk.Purpose
Debug.Print disk.QuotasDisabled
Debug.Print disk.QuotasIncomplete
Debug.Print disk.QuotasRebuilding
Debug.Print disk.SessionID
Debug.Print disk.Size
Debug.Print disk.Status
Debug.Print disk.StatusInfo
Debug.Print disk.SupportsDiskQuotas
Debug.Print disk.SupportsFileBasedCompression
Debug.Print disk.SystemCreationClassName
Debug.Print disk.SystemName
Debug.Print disk.VolumeName
Debug.Print disk.VolumeSerialNumber
Next disk
End Function
Function GetWMIService() As Object
' http://msdn.microsoft.com/en-us/library/aa394586(VS.85).aspx
Dim strComputer As String
strComputer = "."
Set GetWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
End Function