Retrieves information about mapped network drives. The information returned is similar to that available through the Win32_LogicalDisk class, which retrieves information about the logical disks found on a computer.

This script was tested using Kixtart 2001 (412) for Microsoft Windows, available from Kixtart.org.

Kixtart
Edit|Remove
$strComputer = "."
$objWMIService = GetObject("winmgmts:\\"+ $strComputer + "\root\cimv2")
$colItems = $objWMIService.ExecQuery("Select * from Win32_MappedLogicalDisk")
For Each $objItem in $colItems
    ? "Access:" + $objItem.Access
    ? "Availability:" + $objItem.Availability
    ? "Block Size:" + $objItem.BlockSize
    ? "Caption:" + $objItem.Caption
    ? "Compressed:" + $objItem.Compressed
    ? "Config Manager Error Code:" + $objItem.ConfigManagerErrorCode
    ? "Config Manager User Config:" + $objItem.ConfigManagerUserConfig
    ? "Creation Class Name:" + $objItem.CreationClassName
    ? "Description:" + $objItem.Description
    ? "Device ID:" + $objItem.DeviceID
    ? "Error Cleared:" + $objItem.ErrorCleared
    ? "Error Description:" + $objItem.ErrorDescription
    ? "Error Methodology:" + $objItem.ErrorMethodology
    ? "File System:" + $objItem.FileSystem
    ? "Free Space:" + $objItem.FreeSpace
    ? "Install Date:" + $objItem.InstallDate
    ? "Last Error Code:" + $objItem.LastErrorCode
    ? "Maximum Component Length:" + $objItem.MaximumComponentLength
    ? "Name:" + $objItem.Name
    ? "Number Of Blocks:" + $objItem.NumberOfBlocks
    ? "PNP Device ID:" + $objItem.PNPDeviceID
    For Each $x in $objItem.PowerManagementCapabilities
        ? "Power Management Capabilities:" + $x
    Next
    ? "Power Management Supported:" + $objItem.PowerManagementSupported
    ? "Provider Name:" + $objItem.ProviderName
    ? "Purpose:" + $objItem.Purpose
    ? "Quotas Disabled:" + $objItem.QuotasDisabled
    ? "Quotas Incomplete:" + $objItem.QuotasIncomplete
    ? "Quotas Rebuilding:" + $objItem.QuotasRebuilding
    ? "Session ID:" + $objItem.SessionID
    ? "Size:" + $objItem.Size
    ? "Status:" + $objItem.Status
    ? "Status Info:" + $objItem.StatusInfo
    ? "Supports Disk Quotas:" + $objItem.SupportsDiskQuotas
    ? "Supports File Based Compression:" + $objItem.SupportsFileBasedCompression
    ? "System Creation Class Name:" + $objItem.SystemCreationClassName
    ? "System Name:" + $objItem.SystemName
    ? "Volume Name:" + $objItem.VolumeName
    ? "Volume Serial Number:" + $objItem.VolumeSerialNumber
Next