CIM_MemoryCapacity

CIM Memory Capacity
root/cimv2abstractkey : MemoryTypekey : Name

The CIM_MemoryCapacity class represents memory that can be installed on a physical element and its minimum and maximum configurations.

On this page

Main example

List instances

# Abstract class: Get-CimInstance returns the instances of its subclasses
Get-CimInstance -ClassName CIM_MemoryCapacity |
    Select-Object -Property MemoryType, Name, Description, Caption

Abstract class: it has no instances of its own. Get-CimInstance returns the instances of its subclasses.

Examples

Decode numeric values

# Lookup table for MemoryType (values documented by Microsoft)
$memoryTypeName = @{
    0 = 'Unknown'
    1 = 'Other'
    2 = 'DRAM'
    3 = 'Synchronous DRAM'
    4 = 'Cache DRAM'
    5 = 'EDO'
    6 = 'EDRAM'
    7 = 'VRAM'
    8 = 'SRAM'
    9 = 'RAM'
    10 = 'ROM'
    11 = 'Flash'
    12 = 'EEPROM'
    13 = 'FEPROM'
    14 = 'EPROM'
    15 = 'CDRAM'
    16 = '3DRAM'
    17 = 'SDRAM'
    18 = 'SGRAM'
    19 = 'RDRAM'
    20 = 'DDR'
    21 = 'DDR-2'
}

Get-CimInstance -ClassName CIM_MemoryCapacity |
    Select-Object -Property @(
        @{ Name = 'MemoryType'; Expression = { $memoryTypeName[[int]$_.MemoryType] } }
        'Name'
        'Description'
        'Caption'
    )

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 CIM_MemoryCapacity |
        Select-Object -Property MemoryType, Name, Description, Caption
} 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 CIM_MemoryCapacity
$cimClass.CimClassProperties |
    Select-Object -Property Name, CimType, Flags

Properties

6 of 6 properties
NameTypeAccessDescription
Captionstringread

Short textual description of the object.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Caption for each instance
Get-CimInstance -ClassName CIM_MemoryCapacity -Property MemoryType, Name, Caption |
    Select-Object -Property MemoryType, Name, Caption
Descriptionstringread

Textual description of the object.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Description for each instance
Get-CimInstance -ClassName CIM_MemoryCapacity -Property MemoryType, Name, Description |
    Select-Object -Property MemoryType, Name, Description
MaximumMemoryCapacityuint64read

Maximum amount of memory, in kilobytes, that can be supported by the associated physical element.

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

Unit: kilobytes

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of MaximumMemoryCapacity for each instance
# MaximumMemoryCapacity is expressed in kilobytes: converted to GB
Get-CimInstance -ClassName CIM_MemoryCapacity -Property MemoryType, Name, MaximumMemoryCapacity |
    Select-Object -Property @(
        'MemoryType'
        'Name'
        @{ Name = 'MaximumMemoryCapacityGB'; Expression = { [math]::Round($_.MaximumMemoryCapacity / 1MB, 2) } }
    )
MemoryType keyuint16read

Type of memory, which is part of the object key. Values correspond to the list of possible memory types in the CIM_PhysicalMemory class.

Values (22)
ValueLabelDescription
0Unknown
1Other
2DRAM
3Synchronous DRAM
4Cache DRAM
5EDO
6EDRAM
7VRAM
8SRAM
9RAM
10ROM
11Flash
12EEPROM
13FEPROM
14EPROM
15CDRAM
163DRAM
17SDRAM
18SGRAM
19RDRAM
20DDR
21DDR-2
Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of MemoryType for each instance
# Lookup table for MemoryType (values documented by Microsoft)
$memoryTypeName = @{
    0 = 'Unknown'
    1 = 'Other'
    2 = 'DRAM'
    3 = 'Synchronous DRAM'
    4 = 'Cache DRAM'
    5 = 'EDO'
    6 = 'EDRAM'
    7 = 'VRAM'
    8 = 'SRAM'
    9 = 'RAM'
    10 = 'ROM'
    11 = 'Flash'
    12 = 'EEPROM'
    13 = 'FEPROM'
    14 = 'EPROM'
    15 = 'CDRAM'
    16 = '3DRAM'
    17 = 'SDRAM'
    18 = 'SGRAM'
    19 = 'RDRAM'
    20 = 'DDR'
    21 = 'DDR-2'
}
Get-CimInstance -ClassName CIM_MemoryCapacity -Property Name, MemoryType |
    Select-Object -Property @(
        'Name'
        @{ Name = 'MemoryType'; Expression = { $memoryTypeName[[int]$_.MemoryType] } }
    )
MinimumMemoryCapacityuint64read

Minimum amount of memory, in kilobytes, that is needed for the associated physical element to operate correctly.

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

Unit: kilobytes

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of MinimumMemoryCapacity for each instance
# MinimumMemoryCapacity is expressed in kilobytes: converted to GB
Get-CimInstance -ClassName CIM_MemoryCapacity -Property MemoryType, Name, MinimumMemoryCapacity |
    Select-Object -Property @(
        'MemoryType'
        'Name'
        @{ Name = 'MinimumMemoryCapacityGB'; Expression = { [math]::Round($_.MinimumMemoryCapacity / 1MB, 2) } }
    )
Name keystringread

The name of the object; serves as a part of the object key.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Name for each instance
Get-CimInstance -ClassName CIM_MemoryCapacity -Property MemoryType, Name |
    Select-Object -Property MemoryType, Name

Remarks

WMI does not implement this class.

This documentation is derived from the CIM class descriptions published by the DMTF. Microsoft may have made changes to correct minor errors, conform to Microsoft SDK documentation standards, or provide more information.

Inheritance

Superclass chain

  1. CIM_PhysicalCapacity
  2. CIM_MemoryCapacity

Known subclasses

No known subclass.

Requirements

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

Abstract UUID("{FAF76B6B-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.