Win32_CacheMemory

Win32 Cache Memory
root/cimv2dynamickey : DeviceID

The Win32_CacheMemory WMI class represents internal and external cache memory on a computer system.

On this page

Main example

List instances

# All instances of Win32_CacheMemory, with the main properties
Get-CimInstance -ClassName Win32_CacheMemory |
    Select-Object -Property DeviceID, Description, Status, InstallDate

Examples

Filter with WQL

# WQL filter evaluated by the provider: Access = 1 (Readable)
Get-CimInstance -ClassName Win32_CacheMemory -Filter 'Access = 1' |
    Select-Object -Property DeviceID, Description, Status, InstallDate

The filter is evaluated by the WMI provider: less data is transferred than with Where-Object.

Decode numeric values

# Lookup table for Access (values documented by Microsoft)
$accessName = @{
    0 = 'Unknown'
    1 = 'Readable'
    2 = 'Writeable'
    3 = 'Read/Write Supported'
    4 = 'Write Once'
}
# Lookup table for Associativity (values documented by Microsoft)
$associativityName = @{
    1 = 'Other'
    2 = 'Unknown'
    3 = 'Direct Mapped'
    4 = '2-way Set-Associative'
    5 = '4-way Set-Associative'
    6 = 'Fully Associative'
    7 = '8-way Set-Associative'
    8 = '16-way Set-Associative'
}

Get-CimInstance -ClassName Win32_CacheMemory |
    Select-Object -Property @(
        'DeviceID'
        'Description'
        'Status'
        'InstallDate'
        @{ Name = 'Access'; Expression = { $accessName[[int]$_.Access] } }
        @{ Name = 'Associativity'; Expression = { $associativityName[[int]$_.Associativity] } }
    )

Query a remote computer (CIM session)

review before running
# Name of the remote computer
$computerName = 'SERVER01'
# The CIM session (WSMan by default) can be reused for several queries
$cimSession = New-CimSession -ComputerName $computerName
try {
    Get-CimInstance -CimSession $cimSession -ClassName Win32_CacheMemory |
        Select-Object -Property DeviceID, Description, Status, InstallDate
} finally {
    Remove-CimSession -CimSession $cimSession
}

WSMan (WinRM) is used by default. For a host without WinRM, create the session with -SessionOption (New-CimSessionOption -Protocol Dcom). Add -Credential to use another account.

Show the class structure

# Class structure: properties, types and flags (Key, ReadOnly…)
$cimClass = Get-CimClass -ClassName Win32_CacheMemory
$cimClass.CimClassProperties |
    Select-Object -Property Name, CimType, Flags

Properties

53 of 53 properties
NameTypeAccessDescription
Accessuint16read

Type of access.

Values (5)
ValueLabelDescription
0Unknown
1Readable
2WriteableWritable
3Read/Write Supported
4Write 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_CacheMemory -Property DeviceID, Access |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'Access'; Expression = { $accessName[[int]$_.Access] } }
    )
AdditionalErrorDatauint8[]read

Array of octets that hold additional error information. An example is ECC Syndrome or the return of the check bits if a CRC-based error methodology is used. In the latter case, if a single-bit error is recognized and the CRC algorithm is known, it is possible to determine the exact bit that failed. This type of data (ECC Syndrome, Check Bit, Parity Bit data, or other vendor supplied information) is included in this field. If the ErrorInfo property is equal to 3 (OK), then this property has no meaning.

Code
# Value of AdditionalErrorData for each instance
# AdditionalErrorData is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName Win32_CacheMemory -Property AdditionalErrorData |
    Select-Object -ExpandProperty AdditionalErrorData
Associativityuint16read

An integer enumeration that defines the system cache associativity.

This value comes from the Associativity member of the Cache Information structure in the SMBIOS information.

Values (8)
ValueLabelDescription
1Other
2Unknown
3Direct Mapped
42-way Set-Associative
54-way Set-Associative
6Fully Associative
78-way Set-Associative
816-way Set-Associative
Code
# Value of Associativity for each instance
# Lookup table for Associativity (values documented by Microsoft)
$associativityName = @{
    1 = 'Other'
    2 = 'Unknown'
    3 = 'Direct Mapped'
    4 = '2-way Set-Associative'
    5 = '4-way Set-Associative'
    6 = 'Fully Associative'
    7 = '8-way Set-Associative'
    8 = '16-way Set-Associative'
}
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, Associativity |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'Associativity'; Expression = { $associativityName[[int]$_.Associativity] } }
    )
Availabilityuint16read

Availability and status of the device.

This value comes from the Cache Configuration member of the Cache Information structure in the SMBIOS information.

Values (21)
ValueLabelDescription
1Other
2Unknown
3Running/Full PowerRunning or Full Power
4Warning
5In Test
6Not Applicable
7Power Off
8Off Line
9Off Duty
10Degraded
11Not Installed
12Install Error
13Power Save - UnknownThe device is known to be in a power save mode, but its exact status is unknown.
14Power Save - Low Power ModeThe device is in a power save state but still functioning, and may exhibit degraded performance.
15Power Save - StandbyThe device is not functioning, but could be brought to full power quickly.
16Power Cycle
17Power Save - WarningThe device is in a warning state, though also in a power save mode.
18PausedThe device is paused.
19Not ReadyThe device is not ready.
20Not ConfiguredThe device is not configured.
21QuiescedThe 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_CacheMemory -Property DeviceID, Availability |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'Availability'; Expression = { $availabilityName[[int]$_.Availability] } }
    )
BlockSizeuint64read

Size in bytes of the blocks that form this storage extent. If unknown or if a block concept is not valid (for example, for aggregate extents, memory, or logical disks), enter a 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_CacheMemory -Property DeviceID, BlockSize |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'BlockSizeGB'; Expression = { [math]::Round($_.BlockSize / 1GB, 2) } }
    )
CacheSpeeduint32read

Speed of the cache.

This value comes from the Cache Speed member of the Cache Information structure in the SMBIOS information.

Unit: nanoseconds

Code
# Value of CacheSpeed for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, CacheSpeed |
    Select-Object -Property DeviceID, CacheSpeed
CacheTypeuint16read

Type of cache.

This value comes from the System Cache Type member of the Cache Information structure in the SMBIOS information.

Values (5)
ValueLabelDescription
1Other
2Unknown
3Instruction
4Data
5Unified
Code
# Value of CacheType for each instance
# Lookup table for CacheType (values documented by Microsoft)
$cacheTypeName = @{
    1 = 'Other'
    2 = 'Unknown'
    3 = 'Instruction'
    4 = 'Data'
    5 = 'Unified'
}
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, CacheType |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'CacheType'; Expression = { $cacheTypeName[[int]$_.CacheType] } }
    )
Captionstringread

Short description of the object a one-line string.

Code
# Value of Caption for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, Caption |
    Select-Object -Property DeviceID, Caption
ConfigManagerErrorCodeuint32read

Win32 Configuration Manager error code.

Values (32)
ValueLabelDescription
0This device is working properly.Device is working properly.
1This device is not configured correctly.Device is not configured correctly.
2Windows cannot load the driver for this device.
3The 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.
4This 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.
5The driver for this device needs a resource that Windows cannot manage.Driver for the device requires a resource that Windows cannot manage.
6The boot configuration for this device conflicts with other devices.Boot configuration for the device conflicts with other devices.
7Cannot filter.
8The driver loader for the device is missing.Driver loader for the device is missing.
9This 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.
10This device cannot start.Device cannot start.
11This device failed.Device failed.
12This device cannot find enough free resources that it can use.Device cannot find enough free resources to use.
13Windows cannot verify this device's resources.Windows cannot verify the device's resources.
14This device cannot work properly until you restart your computer.Device cannot work properly until the computer is restarted.
15This 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.
16Windows cannot identify all the resources this device uses.Windows cannot identify all of the resources that the device uses.
17This device is asking for an unknown resource type.Device is requesting an unknown resource type.
18Reinstall the drivers for this device.Device drivers must be reinstalled.
19Failure using the VxD loader.
20Your registry might be corrupted.Registry might be corrupted.
21System 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.
22This device is disabled.Device is disabled.
23System 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.
24This 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.
25Windows is still setting up this device.Windows is still setting up the device.
26Windows is still setting up this device.Windows is still setting up the device.
27This device does not have valid log configuration.Device does not have valid log configuration.
28The drivers for this device are not installed.Device drivers are not installed.
29This 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.
30This device is using an Interrupt Request (IRQ) resource that another device is using.Device is using an IRQ resource that another device is using.
31This 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_CacheMemory -Property DeviceID, ConfigManagerErrorCode |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'ConfigManagerErrorCode'; Expression = { $configManagerErrorCodeName[[int]$_.ConfigManagerErrorCode] } }
    )
ConfigManagerUserConfigbooleanread

If True, the device is using a user-defined configuration.

Code
# Value of ConfigManagerUserConfig for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, ConfigManagerUserConfig |
    Select-Object -Property DeviceID, ConfigManagerUserConfig
CorrectableErrorbooleanread

If True, the most recent error was correctable. If the ErrorInfo property is equal to 3 (OK), then this property has no meaning.

Code
# Value of CorrectableError for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, CorrectableError |
    Select-Object -Property DeviceID, CorrectableError
CreationClassName keystringread

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, the 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_CacheMemory -Property DeviceID, CreationClassName |
    Select-Object -Property DeviceID, CreationClassName
CurrentSRAMuint16[]read

Array of types of Static Random Access Memory (SRAM) being used for the cache memory.

This value comes from the Current SRAM Type member of the Cache Information structure in the SMBIOS information.

Values (7)
ValueLabelDescription
0Other
1Unknown
2Non-Burst
3Burst
4Pipeline Burst
5Synchronous
6Asynchronous
Code
# Value of CurrentSRAM for each instance
# Lookup table for CurrentSRAM (values documented by Microsoft)
$currentSRAMName = @{
    0 = 'Other'
    1 = 'Unknown'
    2 = 'Non-Burst'
    3 = 'Burst'
    4 = 'Pipeline Burst'
    5 = 'Synchronous'
    6 = 'Asynchronous'
}
# CurrentSRAM is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName Win32_CacheMemory -Property CurrentSRAM |
    Select-Object -ExpandProperty CurrentSRAM |
    ForEach-Object -Process { $currentSRAMName[[int]$_] }
Descriptionstringread

Description of the object.

Code
# Value of Description for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, Description |
    Select-Object -Property DeviceID, Description
DeviceID keystringread

Unique identifier of the cache represented by an instance of Win32_CacheMemory.

Example: "Cache Memory 1"

Code
# Value of DeviceID for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID |
    Select-Object -Property DeviceID
EndingAddressuint64read

Ending address, referenced by an application or operating system and mapped by a memory controller, for this memory object. The ending address is specified in kilobytes.

For more information about using uint64 values in scripts, see Scripting in WMI.

Unit: kilobytes

Code
# Value of EndingAddress for each instance
# EndingAddress is expressed in kilobytes: converted to GB
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, EndingAddress |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'EndingAddressGB'; Expression = { [math]::Round($_.EndingAddress / 1MB, 2) } }
    )
ErrorAccessuint16read

Memory access operation that caused the last error. The type of error is described by the ErrorInfo property. If ErrorInfo is equal to 3 (OK), then this property has no meaning.

Values (5)
ValueLabelDescription
1Other
2Unknown
3Read
4Write
5Partial Write
Code
# Value of ErrorAccess for each instance
# Lookup table for ErrorAccess (values documented by Microsoft)
$errorAccessName = @{
    1 = 'Other'
    2 = 'Unknown'
    3 = 'Read'
    4 = 'Write'
    5 = 'Partial Write'
}
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, ErrorAccess |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'ErrorAccess'; Expression = { $errorAccessName[[int]$_.ErrorAccess] } }
    )
ErrorAddressuint64read

Address of the last memory error. The type of error is described by the ErrorInfo property. If ErrorInfo is equal to 3 (OK), then this property has no meaning.

For more information about using uint64 values in scripts, see Scripting in WMI.

Code
# Value of ErrorAddress for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, ErrorAddress |
    Select-Object -Property DeviceID, ErrorAddress
ErrorClearedbooleanread

If True, the error reported in LastErrorCode is now cleared.

Code
# Value of ErrorCleared for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, ErrorCleared |
    Select-Object -Property DeviceID, ErrorCleared
ErrorCorrectTypeuint16read

Error correction method used by the cache memory.

This value comes from the Error Correction Type member of the Cache Information structure in the SMBIOS information.

Values (7)
ValueLabelDescription
0Reserved
1Other
2Unknown
3None
4Parity
5Single-bit ECC
6Multi-bit ECC
Code
# Value of ErrorCorrectType for each instance
# Lookup table for ErrorCorrectType (values documented by Microsoft)
$errorCorrectTypeName = @{
    0 = 'Reserved'
    1 = 'Other'
    2 = 'Unknown'
    3 = 'None'
    4 = 'Parity'
    5 = 'Single-bit ECC'
    6 = 'Multi-bit ECC'
}
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, ErrorCorrectType |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'ErrorCorrectType'; Expression = { $errorCorrectTypeName[[int]$_.ErrorCorrectType] } }
    )
ErrorDatauint8[]read

Array of data captured during the last erroneous memory access. The data occupies the first *n* octets of the array necessary to hold the number of bits specified by the ErrorTransferSize property. If ErrorTransferSize is 0 (zero), then this property has no meaning.

Code
# Value of ErrorData for each instance
# ErrorData is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName Win32_CacheMemory -Property ErrorData |
    Select-Object -ExpandProperty ErrorData
ErrorDataOrderuint16read

Ordering for data stored in the ErrorData property. If ErrorTransferSize is 0 (zero), then this property has no meaning.

Values (3)
ValueLabelDescription
0Unknown
1Least Significant Byte First
2Most Significant Byte First
Code
# Value of ErrorDataOrder for each instance
# Lookup table for ErrorDataOrder (values documented by Microsoft)
$errorDataOrderName = @{
    0 = 'Unknown'
    1 = 'Least Significant Byte First'
    2 = 'Most Significant Byte First'
}
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, ErrorDataOrder |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'ErrorDataOrder'; Expression = { $errorDataOrderName[[int]$_.ErrorDataOrder] } }
    )
ErrorDescriptionstringread

More information about the error recorded in LastErrorCode, and information on any corrective actions that may be taken.

Code
# Value of ErrorDescription for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, ErrorDescription |
    Select-Object -Property DeviceID, ErrorDescription
ErrorInfouint16read

Type of error that occurred most recently. The values 12-14 are undefined in the CIM schema because in DMI they mix the semantics of the type of error and whether it was correctable or not. The latter is indicated in the property CorrectableError.

Values (14)
ValueLabelDescription
1Other
2Unknown
3OK
4Bad Read
5Parity Error
6Single-Bit Error
7Double-Bit Error
8Multi-Bit Error
9Nibble Error
10Checksum Error
11CRC Error
12Undefined
13Undefined
14Undefined
Code
# Value of ErrorInfo for each instance
# Lookup table for ErrorInfo (values documented by Microsoft)
$errorInfoName = @{
    1 = 'Other'
    2 = 'Unknown'
    3 = 'OK'
    4 = 'Bad Read'
    5 = 'Parity Error'
    6 = 'Single-Bit Error'
    7 = 'Double-Bit Error'
    8 = 'Multi-Bit Error'
    9 = 'Nibble Error'
    10 = 'Checksum Error'
    11 = 'CRC Error'
    12 = 'Undefined'
    13 = 'Undefined'
    14 = 'Undefined'
}
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, ErrorInfo |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'ErrorInfo'; Expression = { $errorInfoName[[int]$_.ErrorInfo] } }
    )
ErrorMethodologystringread

Details on the parity or CRC algorithms, ECC, or other mechanisms used.

Code
# Value of ErrorMethodology for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, ErrorMethodology |
    Select-Object -Property DeviceID, ErrorMethodology
ErrorResolutionuint64read

Range, in bytes, to which the last error can be resolved. For example, if error addresses are resolved to bit 11 (that is, on a typical page basis), then errors can be resolved to 4 KB boundaries and this property is set to 4000. If the ErrorInfo property is equal to 3 (OK), then this property has no meaning.

For more information about using uint64 values in scripts, see Scripting in WMI.

Unit: bytes

Code
# Value of ErrorResolution for each instance
# ErrorResolution is expressed in bytes: converted to GB
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, ErrorResolution |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'ErrorResolutionGB'; Expression = { [math]::Round($_.ErrorResolution / 1GB, 2) } }
    )
ErrorTimedatetimeread

Time that the last memory error occurred. The type of error is described by the ErrorInfo property. If the ErrorInfo property is equal to 3 (OK), then this property has no meaning.

Code
# Value of ErrorTime for each instance
# CIM cmdlets already return a DateTime object: no conversion is needed
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, ErrorTime |
    Select-Object -Property DeviceID, ErrorTime
ErrorTransferSizeuint32read

Size of the data transfer in bits that caused the last error. 0 (zero) indicates no error. If the ErrorInfo property is equal to 3 (OK), then this property should be set to 0 (zero).

Unit: bits

Code
# Value of ErrorTransferSize for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, ErrorTransferSize |
    Select-Object -Property DeviceID, ErrorTransferSize
FlushTimeruint32read

Maximum amount of time, in seconds, dirty lines or buckets may remain in the cache before they are flushed. A value of 0 (zero) indicates that a cache flush is not controlled by a flushing timer.

Unit: seconds

Code
# Value of FlushTimer for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, FlushTimer |
    Select-Object -Property DeviceID, FlushTimer
InstallDatedatetimeread

Date and time the object was installed. This property does not need a value to indicate that the object is installed.

Code
# Value of InstallDate for each instance
# CIM cmdlets already return a DateTime object: no conversion is needed
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, InstallDate |
    Select-Object -Property DeviceID, InstallDate
InstalledSizeuint32read

Current size of the installed cache memory.

This value comes from the Installed Size member of the Cache Information structure in the SMBIOS information.

Unit: kilobytes

Code
# Value of InstalledSize for each instance
# InstalledSize is expressed in kilobytes: converted to GB
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, InstalledSize |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'InstalledSizeGB'; Expression = { [math]::Round($_.InstalledSize / 1MB, 2) } }
    )
LastErrorCodeuint32read

Last error code reported by the logical device.

Code
# Value of LastErrorCode for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, LastErrorCode |
    Select-Object -Property DeviceID, LastErrorCode
Leveluint16read

Level of the cache.

This value comes from the Cache Configuration member of the Cache Information structure in the SMBIOS information.

Values (6)
ValueLabelDescription
1Other
2Unknown
3Primary
4Secondary
5Tertiary
6Not Applicable
Code
# Value of Level for each instance
# Lookup table for Level (values documented by Microsoft)
$levelName = @{
    1 = 'Other'
    2 = 'Unknown'
    3 = 'Primary'
    4 = 'Secondary'
    5 = 'Tertiary'
    6 = 'Not Applicable'
}
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, Level |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'Level'; Expression = { $levelName[[int]$_.Level] } }
    )
LineSizeuint32read

Size, in bytes, of a single cache bucket or line.

Unit: bytes

Code
# Value of LineSize for each instance
# LineSize is expressed in bytes: converted to GB
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, LineSize |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'LineSizeGB'; Expression = { [math]::Round($_.LineSize / 1GB, 2) } }
    )
Locationuint16read

Physical location of the cache memory.

This value comes from the Cache Configuration member of the Cache Information structure in the SMBIOS information.

Values (4)
ValueLabelDescription
0Internal
1External
2Reserved
3Unknown
Code
# Value of Location for each instance
# Lookup table for Location (values documented by Microsoft)
$locationName = @{
    0 = 'Internal'
    1 = 'External'
    2 = 'Reserved'
    3 = 'Unknown'
}
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, Location |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'Location'; Expression = { $locationName[[int]$_.Location] } }
    )
MaxCacheSizeuint32read

Maximum cache size installable to this particular cache memory.

This value comes from the Maximum Cache Size member of the Cache Information structure in the SMBIOS information.

Unit: kilobytes

Code
# Value of MaxCacheSize for each instance
# MaxCacheSize is expressed in kilobytes: converted to GB
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, MaxCacheSize |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'MaxCacheSizeGB'; Expression = { [math]::Round($_.MaxCacheSize / 1MB, 2) } }
    )
Namestringread

Label by which the object is known. When subclassed, the property can be overridden to be a key property.

Code
# Value of Name for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, Name |
    Select-Object -Property DeviceID, Name
NumberOfBlocksuint64read

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_CacheMemory -Property DeviceID, NumberOfBlocks |
    Select-Object -Property DeviceID, NumberOfBlocks
OtherErrorDescriptionstringread

Free-form string providing more information if the ErrorType property is set to 1, Other. Otherwise, this string has no meaning.

Code
# Value of OtherErrorDescription for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, OtherErrorDescription |
    Select-Object -Property DeviceID, OtherErrorDescription
PNPDeviceIDstringread

Windows Plug and Play device identifier of the logical device.

Example: "*PNP030b"

Code
# Value of PNPDeviceID for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, PNPDeviceID |
    Select-Object -Property DeviceID, PNPDeviceID
PowerManagementCapabilitiesuint16[]read

Array of the specific power-related capabilities of a logical device.

Values (8)
ValueLabelDescription
0Unknown
1Not Supported
2Disabled
3EnabledThe power management features are currently enabled but the exact feature set is unknown or the information is unavailable.
4Power Saving Modes Entered AutomaticallyThe device can change its power state based on usage or other criteria.
5Power State SettableThe 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.
6Power Cycling SupportedThe SetPowerState method can be invoked with the *PowerState* parameter set to 5 (Power Cycle).
7Timed Power On SupportedTimed 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_CacheMemory -Property PowerManagementCapabilities |
    Select-Object -ExpandProperty PowerManagementCapabilities |
    ForEach-Object -Process { $powerManagementCapabilitiesName[[int]$_] }
PowerManagementSupportedbooleanread

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_CacheMemory -Property DeviceID, PowerManagementSupported |
    Select-Object -Property DeviceID, PowerManagementSupported
Purposestringread

Free-form string describing the media and its use.

This value comes from the Socket Designation member of the Cache Information structure in the SMBIOS information.

Code
# Value of Purpose for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, Purpose |
    Select-Object -Property DeviceID, Purpose
ReadPolicyuint16read

Policy that shall be employed by the cache for handling read requests.

Values (6)
ValueLabelDescription
1Other
2Unknown
3Read
4Read-Ahead
5Read and Read-Ahead
6Determination Per I/O
Code
# Value of ReadPolicy for each instance
# Lookup table for ReadPolicy (values documented by Microsoft)
$readPolicyName = @{
    1 = 'Other'
    2 = 'Unknown'
    3 = 'Read'
    4 = 'Read-Ahead'
    5 = 'Read and Read-Ahead'
    6 = 'Determination Per I/O'
}
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, ReadPolicy |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'ReadPolicy'; Expression = { $readPolicyName[[int]$_.ReadPolicy] } }
    )
ReplacementPolicyuint16read

Algorithm to determine which cache lines or buckets should be reused.

Values (8)
ValueLabelDescription
1Other
2Unknown
3Least Recently Used (LRU)
4First In First Out (FIFO)
5Last In First Out (LIFO)
6Least Frequently Used (LFU)
7Most Frequently Used (MFU)
8Data Dependent Multiple Algorithms
Code
# Value of ReplacementPolicy for each instance
# Lookup table for ReplacementPolicy (values documented by Microsoft)
$replacementPolicyName = @{
    1 = 'Other'
    2 = 'Unknown'
    3 = 'Least Recently Used (LRU)'
    4 = 'First In First Out (FIFO)'
    5 = 'Last In First Out (LIFO)'
    6 = 'Least Frequently Used (LFU)'
    7 = 'Most Frequently Used (MFU)'
    8 = 'Data Dependent Multiple Algorithms'
}
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, ReplacementPolicy |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'ReplacementPolicy'; Expression = { $replacementPolicyName[[int]$_.ReplacementPolicy] } }
    )
StartingAddressuint64read

Beginning address, referenced by an application or operating system and mapped by a memory controller, for this memory object. The starting address is specified in kilobytes.

For more information about using uint64 values in scripts, see Scripting in WMI.

Unit: kilobytes

Code
# Value of StartingAddress for each instance
# StartingAddress is expressed in kilobytes: converted to GB
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, StartingAddress |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'StartingAddressGB'; Expression = { [math]::Round($_.StartingAddress / 1MB, 2) } }
    )
Statusstringread

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 be functioning properly but predicting a failure in the near future). Nonoperational statuses include: "Error", "Starting", "Stopping", and "Service". The latter, "Service", could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is online, yet the managed element is neither "OK" nor in one of the other states.

Values include the following:

Values (12)
ValueLabelDescription
OKOK
ErrorError
DegradedDegraded
UnknownUnknown
Pred FailPred Fail
StartingStarting
StoppingStopping
ServiceService
StressedStressed
NonRecoverNonRecover
No ContactNo Contact
Lost CommLost Comm
Code
# Value of Status for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, Status |
    Select-Object -Property DeviceID, Status
StatusInfouint16read

State of the logical device. If this property does not apply to the logical device, the value 5 (Not Applicable) should be used.

This value comes from the Cache Configuration member of the Cache Information structure in the SMBIOS information.

Values (5)
ValueLabelDescription
1Other
2Unknown
3Enabled
4Disabled
5Not 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_CacheMemory -Property DeviceID, StatusInfo |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'StatusInfo'; Expression = { $statusInfoName[[int]$_.StatusInfo] } }
    )
SupportedSRAMuint16[]read

Array of supported types of Static Random Access Memory (SRAM) that can be used for the cache memory.

This value comes from the Supported SRAM Type member of the Cache Information structure in the SMBIOS information.

Values (7)
ValueLabelDescription
0Other
1Unknown
2Non-Burst
3Burst
4Pipeline Burst
5Synchronous
6Asynchronous
Code
# Value of SupportedSRAM for each instance
# Lookup table for SupportedSRAM (values documented by Microsoft)
$supportedSRAMName = @{
    0 = 'Other'
    1 = 'Unknown'
    2 = 'Non-Burst'
    3 = 'Burst'
    4 = 'Pipeline Burst'
    5 = 'Synchronous'
    6 = 'Asynchronous'
}
# SupportedSRAM is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName Win32_CacheMemory -Property SupportedSRAM |
    Select-Object -ExpandProperty SupportedSRAM |
    ForEach-Object -Process { $supportedSRAMName[[int]$_] }
SystemCreationClassName keystringread

Value of the scoping computer's CreationClassName property.

Code
# Value of SystemCreationClassName for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, SystemCreationClassName |
    Select-Object -Property DeviceID, SystemCreationClassName
SystemLevelAddressbooleanread

If True, the address information in the property ErrorAddress is a system-level address. If False, it is a physical address. If the ErrorInfo property is equal to 3, then this property has no meaning.

Code
# Value of SystemLevelAddress for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, SystemLevelAddress |
    Select-Object -Property DeviceID, SystemLevelAddress
SystemName keystringread

Name of the scoping system.

Code
# Value of SystemName for each instance
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, SystemName |
    Select-Object -Property DeviceID, SystemName
WritePolicyuint16read

Write policy definition.

This value comes from the Cache Configuration member of the Cache Information structure in the SMBIOS information.

Values (6)
ValueLabelDescription
1Other
2Unknown
3Write Back
4Write Through
5Varies with Address
6Determination Per I/O
Code
# Value of WritePolicy for each instance
# Lookup table for WritePolicy (values documented by Microsoft)
$writePolicyName = @{
    1 = 'Other'
    2 = 'Unknown'
    3 = 'Write Back'
    4 = 'Write Through'
    5 = 'Varies with Address'
    6 = 'Determination Per I/O'
}
Get-CimInstance -ClassName Win32_CacheMemory -Property DeviceID, WritePolicy |
    Select-Object -Property @(
        'DeviceID'
        @{ Name = 'WritePolicy'; Expression = { $writePolicyName[[int]$_.WritePolicy] } }
    )

Remarks

The Win32_CacheMemory class is derived from CIM_CacheMemory.

Inheritance

Superclass chain

  1. CIM_ManagedSystemElement
  2. CIM_LogicalElement
  3. CIM_LogicalDevice
  4. CIM_StorageExtent
  5. CIM_Memory
  6. CIM_CacheMemory
  7. Win32_CacheMemory

Known subclasses

No known subclass.

Requirements

Namespace
root/cimv2
Minimum client
Windows Vista
Minimum server
Windows Server 2008
Provider
CIMWin32
MOF file
CIMWin32.mof
DLL
CIMWin32.dll
Class qualifiers

Dynamic Provider("CIMWin32") UUID("{FAF76B97-798C-11D2-AAD1-006008C78BC7}") AMENDMENT

Microsoft source

Source: Microsoft Learn

Descriptions, properties and methods come from the Microsoft documentation (MicrosoftDocs/win32 repository), published under the CC BY 4.0 licence. Formatting and translations are specific to this site; the PowerShell examples are written for it.