| Access# | uint16 | read | Values (5)| Value | Label | Description |
|---|
| 0 | Unknown | | | 1 | Readable | | | 2 | Writeable | | | 3 | Read/Write Supported | | | 4 | Write Once | |
Code# Value of Access for each instance
# Lookup table for Access (values documented by Microsoft)
$accessName = @{
0 = 'Unknown'
1 = 'Readable'
2 = 'Writeable'
3 = 'Read/Write Supported'
4 = 'Write Once'
}
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, Access |
Select-Object -Property @(
'DeviceID'
'SessionID'
@{ Name = 'Access'; Expression = { $accessName[[int]$_.Access] } }
)
|
| Availability# | uint16 | read | Availability and status of the device. Values (21)| Value | Label | Description |
|---|
| 1 | Other | | | 2 | Unknown | | | 3 | Running/Full Power | Running or Full Power | | 4 | Warning | | | 5 | In Test | | | 6 | Not Applicable | | | 7 | Power Off | | | 8 | Off Line | Offline | | 9 | Off Duty | | | 10 | Degraded | | | 11 | Not Installed | | | 12 | Install Error | | | 13 | Power Save - Unknown | The device is known to be in a power save mode, but its exact status is unknown. | | 14 | Power Save - Low Power Mode | The device is in a power save state but still functioning and can exhibit degraded performance. | | 15 | Power Save - Standby | The device is not functioning, but can be brought to full power quickly. | | 16 | Power Cycle | | | 17 | Power Save - Warning | The device is in a warning state, though also in a power save mode. | | 18 | Paused | The device is paused. | | 19 | Not Ready | The device is not ready. | | 20 | Not Configured | The device is not configured. | | 21 | Quiesced | The device is quiet. |
Code# Value of Availability for each instance
# Lookup table for Availability (values documented by Microsoft)
$availabilityName = @{
1 = 'Other'
2 = 'Unknown'
3 = 'Running/Full Power'
4 = 'Warning'
5 = 'In Test'
6 = 'Not Applicable'
7 = 'Power Off'
8 = 'Off Line'
9 = 'Off Duty'
10 = 'Degraded'
11 = 'Not Installed'
12 = 'Install Error'
13 = 'Power Save - Unknown'
14 = 'Power Save - Low Power Mode'
15 = 'Power Save - Standby'
16 = 'Power Cycle'
17 = 'Power Save - Warning'
18 = 'Paused'
19 = 'Not Ready'
20 = 'Not Configured'
21 = 'Quiesced'
}
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, Availability |
Select-Object -Property @(
'DeviceID'
'SessionID'
@{ Name = 'Availability'; Expression = { $availabilityName[[int]$_.Availability] } }
)
|
| BlockSize# | uint64 | read | Size, in bytes, of the blocks that form this storage extent. If this concept is not valid for the device type, the value is 1. For more information about using uint64 values in scripts, see Scripting in WMI. Unit: bytes Code# Value of BlockSize for each instance
# BlockSize is expressed in bytes: converted to GB
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, BlockSize |
Select-Object -Property @(
'DeviceID'
'SessionID'
@{ Name = 'BlockSizeGB'; Expression = { [math]::Round($_.BlockSize / 1GB, 2) } }
)
|
| Caption# | string | read | Short description of the object. Code# Value of Caption for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, Caption |
Select-Object -Property DeviceID, SessionID, Caption
|
| Compressed# | boolean | read | If True, the file is compressed. Code# Value of Compressed for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, Compressed |
Select-Object -Property DeviceID, SessionID, Compressed
|
| ConfigManagerErrorCode# | uint32 | read | Windows Configuration Manager error code. Values (32)| Value | Label | Description |
|---|
| 0 | This device is working properly. | Device is working properly. | | 1 | This device is not configured correctly. | Device is not configured correctly. | | 2 | Windows cannot load the driver for this device. | | | 3 | The driver for this device might be corrupted, or your system may be running low on memory or other resources. | Driver for this device might be corrupted, or the system may be low on memory or other resources. | | 4 | This device is not working properly. One of its drivers or your registry might be corrupted. | Device is not working properly. One of its drivers or the registry might be corrupted. | | 5 | The driver for this device needs a resource that Windows cannot manage. | Driver for the device requires a resource that Windows cannot manage. | | 6 | The boot configuration for this device conflicts with other devices. | Boot configuration for the device conflicts with other devices. | | 7 | Cannot filter. | | | 8 | The driver loader for the device is missing. | Driver loader for the device is missing. | | 9 | This device is not working properly because the controlling firmware is reporting the resources for the device incorrectly. | Device is not working properly. The controlling firmware is incorrectly reporting the resources for the device. | | 10 | This device cannot start. | Device cannot start. | | 11 | This device failed. | Device failed. | | 12 | This device cannot find enough free resources that it can use. | Device cannot find enough free resources to use. | | 13 | Windows cannot verify this device's resources. | Windows cannot verify the device's resources. | | 14 | This device cannot work properly until you restart your computer. | Device cannot work properly until the computer is restarted. | | 15 | This device is not working properly because there is probably a re-enumeration problem. | Device is not working properly due to a possible re-enumeration problem. | | 16 | Windows cannot identify all the resources this device uses. | Windows cannot identify all of the resources that the device uses. | | 17 | This device is asking for an unknown resource type. | Device is requesting an unknown resource type. | | 18 | Reinstall the drivers for this device. | Device drivers must be reinstalled. | | 19 | Failure using the VxD loader. | | | 20 | Your registry might be corrupted. | Registry might be corrupted. | | 21 | System failure: Try changing the driver for this device. If that does not work, see your hardware documentation. Windows is removing this device. | System failure. If changing the device driver is ineffective, see the hardware documentation. Windows is removing the device. | | 22 | This device is disabled. | Device is disabled. | | 23 | System failure: Try changing the driver for this device. If that doesn't work, see your hardware documentation. | System failure. If changing the device driver is ineffective, see the hardware documentation. | | 24 | This device is not present, is not working properly, or does not have all its drivers installed. | Device is not present, not working properly, or does not have all of its drivers installed. | | 25 | Windows is still setting up this device. | Windows is still setting up the device. | | 26 | Windows is still setting up this device. | Windows is still setting up the device. | | 27 | This device does not have valid log configuration. | Device does not have a valid log configuration. | | 28 | The drivers for this device are not installed. | Device drivers are not installed. | | 29 | This device is disabled because the firmware of the device did not give it the required resources. | Device is disabled. The device firmware did not provide the required resources. | | 30 | This device is using an Interrupt Request (IRQ) resource that another device is using. | Device is using an IRQ resource that another device is using. | | 31 | This device is not working properly because Windows cannot load the drivers required for this device. | Device is not working properly. Windows cannot load the required device drivers. |
Code# Value of ConfigManagerErrorCode for each instance
# Lookup table for ConfigManagerErrorCode (values documented by Microsoft)
$configManagerErrorCodeName = @{
0 = 'This device is working properly'
1 = 'This device is not configured correctly'
2 = 'Windows cannot load the driver for this device'
3 = 'The driver for this device might be corrupted, or your…'
4 = 'This device is not working properly'
5 = 'The driver for this device needs a resource that Windows…'
6 = 'The boot configuration for this device conflicts with other…'
7 = 'Cannot filter'
8 = 'The driver loader for the device is missing'
9 = 'This device is not working properly because the controlling…'
10 = 'This device cannot start'
11 = 'This device failed'
12 = 'This device cannot find enough free resources that it can use'
13 = 'Windows cannot verify this device''s resources'
14 = 'This device cannot work properly until you restart your…'
15 = 'This device is not working properly because there is…'
16 = 'Windows cannot identify all the resources this device uses'
17 = 'This device is asking for an unknown resource type'
18 = 'Reinstall the drivers for this device'
19 = 'Failure using the VxD loader'
20 = 'Your registry might be corrupted'
21 = 'System failure: Try changing the driver for this device'
22 = 'This device is disabled'
23 = 'System failure: Try changing the driver for this device'
24 = 'This device is not present, is not working properly, or does…'
25 = 'Windows is still setting up this device'
26 = 'Windows is still setting up this device'
27 = 'This device does not have valid log configuration'
28 = 'The drivers for this device are not installed'
29 = 'This device is disabled because the firmware of the device…'
30 = 'This device is using an Interrupt Request (IRQ) resource…'
31 = 'This device is not working properly because Windows cannot…'
}
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, ConfigManagerErrorCode |
Select-Object -Property @(
'DeviceID'
'SessionID'
@{ Name = 'ConfigManagerErrorCode'; Expression = { $configManagerErrorCodeName[[int]$_.ConfigManagerErrorCode] } }
)
|
| ConfigManagerUserConfig# | boolean | read | If True, the device is using a user-defined configuration. Code# Value of ConfigManagerUserConfig for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, ConfigManagerUserConfig |
Select-Object -Property DeviceID, SessionID, ConfigManagerUserConfig
|
| CreationClassName# key | string | read | Name of the first concrete class to appear in the inheritance chain used in the creation of an instance. When used with the other key properties of the class, this property allows all instances of this class and its subclasses to be uniquely identified. Code# Value of CreationClassName for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, CreationClassName |
Select-Object -Property DeviceID, SessionID, CreationClassName
|
| Description# | string | read | Description of the object. Code# Value of Description for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, Description |
Select-Object -Property DeviceID, SessionID, Description
|
| DeviceID# key | string | read | Unique identifier of the memory array. Example: "Memory Array 1" Code# Value of DeviceID for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property SessionID, DeviceID |
Select-Object -Property SessionID, DeviceID
|
| ErrorCleared# | boolean | read | If True, the error reported in LastErrorCode is now cleared. Code# Value of ErrorCleared for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, ErrorCleared |
Select-Object -Property DeviceID, SessionID, ErrorCleared
|
| ErrorDescription# | string | read | More information about the error recorded in LastErrorCode, and information on any corrective actions that can be taken. Code# Value of ErrorDescription for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, ErrorDescription |
Select-Object -Property DeviceID, SessionID, ErrorDescription
|
| ErrorMethodology# | string | read | Types of error checking used by the hardware. Code# Value of ErrorMethodology for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, ErrorMethodology |
Select-Object -Property DeviceID, SessionID, ErrorMethodology
|
| FileSystem# | string | read | Code# Value of FileSystem for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, FileSystem |
Select-Object -Property DeviceID, SessionID, FileSystem
|
| FreeSpace# | uint64 | read | Space available on the logical disk. For more information about using uint64 values in scripts, see Scripting in WMI. Unit: bytes Code# Value of FreeSpace for each instance
# FreeSpace is expressed in bytes: converted to GB
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, FreeSpace |
Select-Object -Property @(
'DeviceID'
'SessionID'
@{ Name = 'FreeSpaceGB'; Expression = { [math]::Round($_.FreeSpace / 1GB, 2) } }
)
|
| InstallDate# | datetime | read | Code# Value of InstallDate for each instance
# CIM cmdlets already return a DateTime object: no conversion is needed
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, InstallDate |
Select-Object -Property DeviceID, SessionID, InstallDate
|
| LastErrorCode# | uint32 | read | Last error code reported by the logical device. Code# Value of LastErrorCode for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, LastErrorCode |
Select-Object -Property DeviceID, SessionID, LastErrorCode
|
| MaximumComponentLength# | uint32 | read | Contains the maximum length of a file-name component supported by the Windows drive. Example: 255 Code# Value of MaximumComponentLength for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, MaximumComponentLength |
Select-Object -Property DeviceID, SessionID, MaximumComponentLength
|
| Name# | string | read | Code# Value of Name for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, Name |
Select-Object -Property DeviceID, SessionID, Name
|
| NumberOfBlocks# | uint64 | read | Total number of consecutive blocks, each block the size of the value contained in the BlockSize property, which form this storage extent. Total size of the storage extent can be calculated by multiplying the value of the BlockSize property by the value of this property. If the value of BlockSize is 1, this property is the total size of the storage extent. For more information about using uint64 values in scripts, see Scripting in WMI. Code# Value of NumberOfBlocks for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, NumberOfBlocks |
Select-Object -Property DeviceID, SessionID, NumberOfBlocks
|
| PNPDeviceID# | string | read | Windows Plug and Play device identifier of the logical device. Example: "*PNP030b" Code# Value of PNPDeviceID for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, PNPDeviceID |
Select-Object -Property DeviceID, SessionID, PNPDeviceID
|
| PowerManagementCapabilities# | uint16[] | read | Array of the specific power-related capabilities of a logical device. Values (8)| Value | Label | Description |
|---|
| 0 | Unknown | | | 1 | Not Supported | | | 2 | Disabled | | | 3 | Enabled | The power management features are currently enabled but the exact feature set is unknown or the information is unavailable. | | 4 | Power Saving Modes Entered Automatically | The device can change its power state based on usage or other criteria. | | 5 | Power State Settable | The SetPowerState method is supported. This method is found on the parent **CIM_LogicalDevice** class and can be implemented. For more information, see Designing Managed Object Format (MOF) Classes. | | 6 | Power Cycling Supported | The SetPowerState method can be invoked with the *PowerState* parameter set to 5 (Power Cycle). | | 7 | Timed Power On Supported | Timed Power-On Supported
The SetPowerState method can be invoked with the *PowerState* parameter set to 5 (Power Cycle) and *Time* set to a specific date and time, or interval, for power-on. |
Code# Value of PowerManagementCapabilities for each instance
# Lookup table for PowerManagementCapabilities (values documented by Microsoft)
$powerManagementCapabilitiesName = @{
0 = 'Unknown'
1 = 'Not Supported'
2 = 'Disabled'
3 = 'Enabled'
4 = 'Power Saving Modes Entered Automatically'
5 = 'Power State Settable'
6 = 'Power Cycling Supported'
7 = 'Timed Power On Supported'
}
# PowerManagementCapabilities is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property PowerManagementCapabilities |
Select-Object -ExpandProperty PowerManagementCapabilities |
ForEach-Object -Process { $powerManagementCapabilitiesName[[int]$_] }
|
| PowerManagementSupported# | boolean | read | If True, the device can be power-managed (can be put into suspend mode, and so on). The property does not indicate that power management features are currently enabled, only that the logical device is capable of power management. Code# Value of PowerManagementSupported for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, PowerManagementSupported |
Select-Object -Property DeviceID, SessionID, PowerManagementSupported
|
| ProviderName# | string | read | Network path name to the logical device. Code# Value of ProviderName for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, ProviderName |
Select-Object -Property DeviceID, SessionID, ProviderName
|
| Purpose# | string | read | Free-form string that describes the media and its use. Code# Value of Purpose for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, Purpose |
Select-Object -Property DeviceID, SessionID, Purpose
|
| QuotasDisabled# | boolean | read | If True, quota management is not enabled for this volume. Code# Value of QuotasDisabled for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, QuotasDisabled |
Select-Object -Property DeviceID, SessionID, QuotasDisabled
|
| QuotasIncomplete# | boolean | read | If True, quota management was used but has been disabled. Incomplete refers to the information left in the file system after quota management has been disabled. Code# Value of QuotasIncomplete for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, QuotasIncomplete |
Select-Object -Property DeviceID, SessionID, QuotasIncomplete
|
| QuotasRebuilding# | boolean | read | If True, the file system is setting up for quota management. Code# Value of QuotasRebuilding for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, QuotasRebuilding |
Select-Object -Property DeviceID, SessionID, QuotasRebuilding
|
| SessionID# key | string | read | ID of the user's session. The user may be connected using a local login or a terminal session. Code# Value of SessionID for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID |
Select-Object -Property DeviceID, SessionID
|
| Size# | uint64 | read | Size of the logical disk. For more information about using uint64 values in scripts, see Scripting in WMI. Unit: bytes Code# Value of Size for each instance
# Size is expressed in bytes: converted to GB
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, Size |
Select-Object -Property @(
'DeviceID'
'SessionID'
@{ Name = 'SizeGB'; Expression = { [math]::Round($_.Size / 1GB, 2) } }
)
|
| Status# | string | read | Current status of the object. Various operational and nonoperational statuses can be defined. Operational statuses include: "OK", "Degraded", and "Pred Fail" (an element, such as a SMART-enabled hard disk drive may function properly, but predicts a failure in the near future). Nonoperational statuses include: "Error", "Starting", "Stopping", and "Service". The Service status applies to administrative work, such as mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is online, but the managed element is neither "OK" nor in one of the other states. The values are: Values (12)| Value | Label | Description |
|---|
| OK | OK | | | Error | Error | | | Degraded | Degraded | | | Unknown | Unknown | | | Pred Fail | Pred Fail | | | Starting | Starting | | | Stopping | Stopping | | | Service | Service | | | Stressed | Stressed | | | NonRecover | NonRecover | | | No Contact | No Contact | | | Lost Comm | Lost Comm | |
Code# Value of Status for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, Status |
Select-Object -Property DeviceID, SessionID, Status
|
| StatusInfo# | uint16 | read | State of the logical device. If this property does not apply to the logical device, the value 5 (Not Applicable) should be used. Values (5)| Value | Label | Description |
|---|
| 1 | Other | | | 2 | Unknown | | | 3 | Enabled | | | 4 | Disabled | | | 5 | Not Applicable | |
Code# Value of StatusInfo for each instance
# Lookup table for StatusInfo (values documented by Microsoft)
$statusInfoName = @{
1 = 'Other'
2 = 'Unknown'
3 = 'Enabled'
4 = 'Disabled'
5 = 'Not Applicable'
}
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, StatusInfo |
Select-Object -Property @(
'DeviceID'
'SessionID'
@{ Name = 'StatusInfo'; Expression = { $statusInfoName[[int]$_.StatusInfo] } }
)
|
| SupportsDiskQuotas# | boolean | read | If True, then the file system on which this network drive is mapped supports disk quotas. Code# Value of SupportsDiskQuotas for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, SupportsDiskQuotas |
Select-Object -Property DeviceID, SessionID, SupportsDiskQuotas
|
| SupportsFileBasedCompression# | boolean | read | If True, the logical disk partition supports file-based compression, such as is the case with NTFS. This property is False, when the Compressed property is True. Code# Value of SupportsFileBasedCompression for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, SupportsFileBasedCompression |
Select-Object -Property DeviceID, SessionID, SupportsFileBasedCompression
|
| SystemCreationClassName# key | string | read | Value of the scoping computer's CreationClassName property. Code# Value of SystemCreationClassName for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, SystemCreationClassName |
Select-Object -Property DeviceID, SessionID, SystemCreationClassName
|
| SystemName# key | string | read | Name of the scoping system. Code# Value of SystemName for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, SystemName |
Select-Object -Property DeviceID, SessionID, SystemName
|
| VolumeName# | string | read/write | Volume name of the logical disk. This property value can have a maximum of 32 characters. Code# Value of VolumeName for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, VolumeName |
Select-Object -Property DeviceID, SessionID, VolumeName
Warning. Changes the system: check with -WhatIf first. An elevated console is often required. # Warning: changes VolumeName on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_MappedLogicalDisk -Filter "DeviceID = 'Example'"
$setParameters = @{
InputObject = $instance
Property = @{ VolumeName = 'Example' }
WhatIf = $true # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
|
| VolumeSerialNumber# | string | read | Volume serial number of the logical disk. This property value can have a maximum of 11 characters. Example: "A8C3-D032" Code# Value of VolumeSerialNumber for each instance
Get-CimInstance -ClassName Win32_MappedLogicalDisk -Property DeviceID, SessionID, VolumeSerialNumber |
Select-Object -Property DeviceID, SessionID, VolumeSerialNumber
|