Reference for Win32_MappedLogicalDisk
|
|
Category (Kategorie): Mapped Drives and File Shares
Description (Beschreibung): The Win32_MappedLogicalDisk WMI class represents network storage devices that are mapped as logical disks on the computer system.
The instances returned for this class will be as follows, supposing that user A is enumerating the instances:
The provider looks for a logon session of user A on that machine:
If there is one (and only one) such logon session, then the provider will return the mapped drives of that session.
If there is more than one session for user A on the machine, then no mapped drive instances will be returned (because the provider has no reasonable way of deciding which session to use).
If there are no sessions of user A running, and there is a locally logged on user B:
If there is a single session for user B, then the provider will impersonate A and return the mapped drives of user B. This case supports the scenario of helpdesk wanting to see the instances of a locally logged on user.
Again, if there is more than one session of user B running on the machine, then the provider has no way of deciding which to use. In this case, no mapped drive instances will be returned.
Availability (Verfügbarkeit): WMI Class Name | Windows Server 2003 | Windows XP Professional | Windows 2000 | Windows NT 4.0 | Windows 98 | Win32_MappedLogicalDisk | Yes | Yes | - | - | - |
Properties (Attribute): Item | Server 2003 | XP Pro | Windows 2000 | NT 4.0 | Windows 98 | Access | Yes | Yes | - | - | - | Availability | Yes | Yes | - | - | - | BlockSize | Yes | Yes | - | - | - | Caption | Yes | Yes | - | - | - | Compressed | Yes | Yes | - | - | - | ConfigManagerErrorCode | Yes | Yes | - | - | - | ConfigManagerUserConfig | Yes | Yes | - | - | - | CreationClassName | Yes | Yes | - | - | - | Description | Yes | Yes | - | - | - | DeviceID | Yes | Yes | - | - | - | ErrorCleared | Yes | Yes | - | - | - | ErrorDescription | Yes | Yes | - | - | - | ErrorMethodology | Yes | Yes | - | - | - | FileSystem | Yes | Yes | - | - | - | FreeSpace | Yes | Yes | - | - | - | InstallDate | Yes | Yes | - | - | - | LastErrorCode | Yes | Yes | - | - | - | MaximumComponentLength | Yes | Yes | - | - | - | Name | Yes | Yes | - | - | - | NumberOfBlocks | Yes | Yes | - | - | - | PNPDeviceID | Yes | Yes | - | - | - | PowerManagementCapabilities | Yes | Yes | - | - | - | PowerManagementSupported | Yes | Yes | - | - | - | ProviderName | Yes | Yes | - | - | - | Purpose | Yes | Yes | - | - | - | QuotasDisabled | Yes | Yes | - | - | - | QuotasIncomplete | Yes | Yes | - | - | - | QuotasRebuilding | Yes | Yes | - | - | - | SessionID | Yes | Yes | - | - | - | Size | Yes | Yes | - | - | - | Status | Yes | Yes | - | - | - | StatusInfo | Yes | Yes | - | - | - | SupportsDiskQuotas | Yes | Yes | - | - | - | SupportsFileBasedCompression | Yes | Yes | - | - | - | SystemCreationClassName | Yes | Yes | - | - | - | SystemName | Yes | Yes | - | - | - | VolumeName | Yes | Yes | - | - | - | VolumeSerialNumber | Yes | Yes | - | - | - |
Methods (Methoden): Item | Server 2003 | XP Pro | Windows 2000 | NT 4.0 | Windows 98 | Reset | Yes | Yes | - | - | - | SetPowerState | Yes | Yes | - | - | - |
Sample Code (Beispiel):
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_MappedLogicalDisk")
For Each objItem in colItems
Wscript.Echo "Caption: " & objItem.Caption
Next
Links:
Link zur Original-Microsoft-Dokumentation
www.IT-Visions.de, (C) Dr. Holger Schwichtenberg
|