Main example
List instances
# Abstract class: Get-CimInstance returns the instances of its subclasses
Get-CimInstance -ClassName CIM_PhysicalMemory |
Select-Object -Property @(
'Tag'
'Description'
'Status'
'Manufacturer'
'Model'
'Version'
'SerialNumber'
)Abstract class: it has no instances of its own. Get-CimInstance returns the instances of its subclasses (Win32_PhysicalMemory).
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 = 'DDR2'
22 = 'DDR2 FB-DIMM'
}
Get-CimInstance -ClassName CIM_PhysicalMemory |
Select-Object -Property @(
'Tag'
'Description'
'Status'
'Manufacturer'
'Model'
'Version'
'SerialNumber'
)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_PhysicalMemory |
Select-Object -Property @(
'Tag'
'Description'
'Status'
'Manufacturer'
'Model'
'Version'
'SerialNumber'
)
} 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_PhysicalMemory
$cimClass.CimClassProperties |
Select-Object -Property Name, CimType, FlagsProperties
| Name | Type | Access | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| BankLabel# | string | read | Labeled bank in which the memory is located. For example, "Bank 0" or "Bank A". Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Capacity# | uint64 | read | Total capacity of the physical memory, in bytes. For more information about using uint64 values in scripts, see Scripting in WMI. Unit: bytes Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Caption# | string | read | Short textual description of the object. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CreationClassName# key | string | read | Name of the class or subclass used in the creation of an instance. When used with other key properties of the class, this property allows all instances of the class and its subclasses to be uniquely identified. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DataWidth# | uint16 | read | Data width of the physical memory, in bits. A data width of 0 (zero) , and a total width of 8, indicates that the memory is solely used to provide error correction bits. Unit: bits Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description# | string | read | Textual description of the object. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FormFactor# | uint16 | read | Implementation form factor for the chip. For example, values such as SIMM, TSOP, or PGA can be specified. 0 Unknown 1 Other 2 SIP 3 DIP 4 ZIP 5 SOJ 6 Proprietary 7 SIMM 8 DIMM 9 TSOP 10 PGA 11 RIMM 12 SODIMM 13 SRIMM 14 SMD 15 SSMP 16 QFP 17 TQFP 18 SOIC 19 LCC 20 PLCC 21 BGA 22 FPBGA 23 LGA Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| HotSwappable# | boolean | read | If TRUE, the package can be hot-swapped. A physical package can be hot-swapped if the element can be replaced by a physically different (but equivalent) one while the containing package is turned on. For example, a fan component may be designed to be hot-swapped. All components that can be hot-swapped are inherently removable and replaceable. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| InstallDate# | datetime | read | Date and time the object was installed. This property does not need a value to indicate that the object is installed. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| InterleavePosition# | uint32 | read | Position of the physical memory in an interleave. A value of 0 indicates non-interleaved, 1 indicates the first position, 2 indicates the second position, and so on. For example, in a 2:1 interleave, a value of 1 indicates that the memory is in the even position. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Manufacturer# | string | read | Name of the organization responsible for producing the physical element. For more information, see the Vendor property of CIM_Product. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MemoryType# | uint16 | read | Type of physical memory. Values (23)
Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Model# | string | read | Name by which the physical element is generally known. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Name# | string | read | Label by which the object is known. When subclassed, this property can be overridden to be a key property. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OtherIdentifyingInfo# | string | read | Additional data, beyond asset tag information, that can be used to identify a physical element. One example is bar-code data that is associated with an element, which also has an asset tag. Note that if only bar-code data is available, and is unique and able to be used as an element key, this property would be null and the bar-code data would be used as the class key in the Tag property. This property is inherited from CIM_PhysicalElement. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PartNumber# | string | read | Part number assigned by the organization that produced or manufactured the physical element. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PositionInRow# | uint32 | read | Position of the physical memory in a row. For example, if it takes two 8-bit memory devices to form a 16-bit row, then a value of 2 indicates that the memory is the second device. A value of 0 is an invalid value for this property. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PoweredOn# | boolean | read | If TRUE, the physical element is powered on. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Removable# | boolean | read | If TRUE, this element is designed to be taken in and out of the physical container in which it is normally found, without impairing the function of the overall packaging. A package is considered removable even if the power must be off to perform the removal. If the power can be on and the package removed, then the element is removable and can be hot-swapped. For example, an upgradable processor chip is removable. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Replaceable# | boolean | read | If TRUE, it is possible to replace the element with a physically different one. For example, some computer systems allow the main processor chip to be upgraded to one of a higher clock rating. In this case, the processor is said to be replaceable. All removable components are inherently replaceable. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SerialNumber# | string | read | Manufacturer-allocated number used to identify the physical element. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SKU# | string | read | Stock-keeping unit number for the physical element. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Speed# | uint32 | read | Speed of the physical memory, in nanoseconds. Unit: nanoseconds Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Status# | string | read | Current status of the object. This property is inherited from CIM_ManagedSystemElement. Values include the following: Values (12)
Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Tag# key | string | read | Arbitrary string that uniquely identifies the physical element and serves as the element's key. This property can contain information, such as asset tag or serial number data. The key for CIM_PhysicalElement is placed very high in the object hierarchy to independently identify the hardware or entity, regardless of physical placement in (or on) cabinets, adapters, and so on. For example, a removable component that can be hot-swapped can be taken from its containing (scoping) package and be temporarily unused. The object still continues to exist and can even be inserted into a different scoping container. The key for a physical element is an arbitrary string that is defined independently of placement or location-oriented hierarchy. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| TotalWidth# | uint16 | read | Total width, in bits, of the physical memory, including check or error correction bits. If there are no error correction bits, the value in this property should match that specified for the DataWidth property. Unit: bits Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Version# | string | read | Version of the physical element. Code |
Remarks
The CIM_PhysicalMemory class is derived from CIM_Chip.
WMI does not implement this class. For WMI classes derived from CIM_PhysicalMemory, see Win32 Classes.
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
- CIM_ManagedSystemElement
- CIM_PhysicalElement
- CIM_PhysicalComponent
- CIM_Chip
- CIM_PhysicalMemory
Known subclasses
Requirements
- Namespace
- root/cimv2
- Minimum client
- Windows Vista
- Minimum server
- Windows Server 2008
- MOF file
- CIMWin32.mof
- DLL
- CIMWin32.dll
Class qualifiers
abstract UUID("{FAF76B7B-798C-11D2-AAD1-006008C78BC7}") AMENDMENT
Microsoft source
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.