Main example
List instances
# All instances of Win32_PhysicalMemory, with the main properties
Get-CimInstance -ClassName Win32_PhysicalMemory |
Select-Object -Property @(
'Tag'
'Description'
'Status'
'Manufacturer'
'Model'
'Version'
'SerialNumber'
)Examples
Filter with WQL
# WQL filter evaluated by the provider: MemoryType = 2 (DRAM)
Get-CimInstance -ClassName Win32_PhysicalMemory -Filter 'MemoryType = 2' |
Select-Object -Property @(
'Tag'
'Description'
'Status'
'Manufacturer'
'Model'
'Version'
'SerialNumber'
)The filter is evaluated by the WMI provider: less data is transferred than with Where-Object.
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'
26 = 'DDR4'
}
# Lookup table for TypeDetail (values documented by Microsoft)
$typeDetailName = @{
1 = 'Reserved'
2 = 'Other'
4 = 'Unknown'
8 = 'Fast-paged'
16 = 'Static column'
32 = 'Pseudo-static'
64 = 'RAMBUS'
128 = 'Synchronous'
256 = 'CMOS'
512 = 'EDO'
1024 = 'Window DRAM'
2048 = 'Cache DRAM'
4096 = 'Non-volatile'
}
Get-CimInstance -ClassName Win32_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 Win32_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 Win32_PhysicalMemory
$cimClass.CimClassProperties |
Select-Object -Property Name, CimType, FlagsProperties
| Name | Type | Access | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Attributes# | uint32 | read | SMBIOS - Type 17 - Attributes. Represents the RANK. This value comes from the Attributes member of the Memory Device structure in the SMBIOS information. Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista: This property is not supported before Windows Server 2016 and Windows 10. Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| BankLabel# | string | read | Physically labeled bank where the memory is located. Examples: "Bank 0", "Bank A" This value comes from the Bank Locator member of the Memory Device structure in the SMBIOS information. Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Capacity# | uint64 | read | Total capacity of the physical memory—in bytes. This value comes from the Memory Device structure in the SMBIOS version information. For SMBIOS versions 2.1 thru 2.6 the value comes from the Size member. For SMBIOS version 2.7+ the value comes from the Extended Size member. For more information about using uint64 values in scripts, see Scripting in WMI. Unit: bytes Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Caption# | string | read | Short description of the object—a one-line string. Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ConfiguredClockSpeed# | uint32 | read | The configured clock speed of the memory device, in megahertz (MHz), or 0, if the speed is unknown. This value comes from the Configured Memory Clock Speed member of the Memory Device structure in the SMBIOS information. Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista: This property is not supported before Windows Server 2016 and Windows 10. Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ConfiguredVoltage# | uint32 | read | Configured voltage for this device, in millivolts, or 0, if the voltage is unknown. This value comes from the Configured voltage member of the Memory Device structure in the SMBIOS information. Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista: This property is not supported before Windows Server 2016 and Windows 10. Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CreationClassName# key | string | read | Name of the first concrete class that appears 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 identified uniquely. Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DataWidth# | uint16 | read | Data width of the physical memory—in bits. A data width of 0 (zero) and a total width of 8 (eight) indicates that the memory is used solely to provide error correction bits. This value comes from the Data Width member of the Memory Device structure in the SMBIOS information. Unit: bits Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description# | string | read | Description of an object. Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DeviceLocator# | string | read | Label of the socket or circuit board that holds the memory. Example: "SIMM 3" This value comes from the Device Locator member of the Memory Device structure in the SMBIOS information. Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FormFactor# | uint16 | read | Implementation form factor for the chip. This value comes from the Form Factor member of the Memory Device structure in the SMBIOS information. (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, this physical media component can be replaced with a physically different but equivalent one while the containing package has the power applied. 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 is installed. This property does not need a value to indicate that the object is installed. Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| InterleaveDataDepth# | uint16 | read | Unsigned 16-bit integer maximum number of consecutive rows of data that are accessed in a single interleaved transfer from the memory device. If the value is 0 (zero), the memory is not interleaved. Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| InterleavePosition# | uint32 | read | Position of the physical memory in an interleave. For example, in a 2:1 interleave, a value of "1" indicates that the memory is in the "even" position. 0 Noninterleaved 1 First position 2 Second position Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Manufacturer# | string | read | Name of the organization responsible for producing the physical element. This value comes from the Manufacturer member of the Memory Device structure in the SMBIOS information. Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MaxVoltage# | uint32 | read | The maximum operating voltage for this device, in millivolts, or 0, if the voltage is unknown. This value comes from the Maximum voltage member of the Memory Device structure in the SMBIOS information. Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista: This property is not supported before Windows Server 2016 and Windows 10. Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MemoryType# | uint16 | read | Type of physical memory. This is a CIM value that is mapped to the SMBIOS value. The SMBIOSMemoryType property contains the raw SMBIOS memory type. This value comes from the Memory Type member of the Memory Device structure in the SMBIOS information. 24 DDR3—May not be available. 25 FBD2 Values (24)
Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MinVoltage# | uint32 | read | The minimum operating voltage for this device, in millivolts, or 0, if the voltage is unknown. This value comes from the Minimum voltage member of the Memory Device structure in the SMBIOS information. Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista: This property is not supported before Windows Server 2016 and Windows 10. Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Model# | string | read | Name for the physical element. Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Name# | string | read | Label for the object. When subclassed, the 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 associated with an element that also has an asset tag. If only bar code data is available and unique or able to be used as an element key, this property is be NULL and the bar code data is used as the class key in the tag property. Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PartNumber# | string | read | Part number assigned by the organization responsible for producing or manufacturing the physical element. This value comes from the Part Number member of the Memory Device structure in the SMBIOS information. 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 (two) means that this memory is the second device—0 (zero) 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, a physical component is removable (if it 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 component can still be removable if power must be "off" to perform the removal. If power can be "on" and the component 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, this physical media component can be replaced 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 to identify the physical element. This value comes from the Serial Number member of the Memory Device structure in the SMBIOS information. Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SKU# | string | read | Stock keeping unit number for the physical element. Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SMBIOSMemoryType# | uint32 | read | The raw SMBIOS memory type. The value of the MemoryType property is a CIM value that is mapped to the SMBIOS value. Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista: This property is not supported before Windows Server 2016 and Windows 10. Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Speed# | uint32 | read | Speed of the physical memory—in nanoseconds. This value comes from the Speed member of the Memory Device structure in the SMBIOS information. Unit: nanoseconds Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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 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. The possible values are. Values (12)
Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Tag# key | string | read | Unique identifier for the physical memory device that is represented by an instance of Win32_PhysicalMemory. This property is inherited from CIM_PhysicalElement. Example: "Physical Memory 1" 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 what is specified for the DataWidth property. This value comes from the Total Width member of the Memory Device structure in the SMBIOS information. Unit: bits Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| TypeDetail# | uint16 | read | Type of physical memory represented. This value comes from the Type Detail member of the Memory Device structure in the SMBIOS information. Values (13)
Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Version# | string | read | Version of the physical element. Code |
Remarks
The Win32_PhysicalMemory class is derived from CIM_PhysicalMemory.
Inheritance
Superclass chain
- CIM_ManagedSystemElement
- CIM_PhysicalElement
- CIM_PhysicalComponent
- CIM_Chip
- CIM_PhysicalMemory
- Win32_PhysicalMemory
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("{FAF76B93-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.