Main example
List instances
# All instances of Win32_PhysicalMemoryArray, with the main properties
Get-CimInstance -ClassName Win32_PhysicalMemoryArray |
Select-Object -Property @(
'Tag'
'Description'
'Status'
'Manufacturer'
'Model'
'Version'
'SerialNumber'
)Examples
Filter with WQL
# WQL filter evaluated by the provider: Location = 14 (PC-98/Local bus add-on card)
Get-CimInstance -ClassName Win32_PhysicalMemoryArray -Filter 'Location = 14' |
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 Location (values documented by Microsoft)
$locationName = @{
0 = 'Reserved'
1 = 'Other'
2 = 'Unknown'
3 = 'System board or motherboard'
4 = 'ISA add-on card'
5 = 'EISA add-on card'
6 = 'PCI add-on card'
7 = 'MCA add-on card'
8 = 'PCMCIA add-on card'
9 = 'Proprietary add-on card'
10 = 'NuBus'
11 = 'PC-98/C20 add-on card'
12 = 'PC-98/C24 add-on card'
13 = 'PC-98/E add-on card'
14 = 'PC-98/Local bus add-on card'
}
# Lookup table for MemoryErrorCorrection (values documented by Microsoft)
$memoryErrorCorrectionName = @{
0 = 'Reserved'
1 = 'Other'
2 = 'Unknown'
3 = 'None'
4 = 'Parity'
5 = 'Single-bit ECC'
6 = 'Multi-bit ECC'
7 = 'CRC'
}
Get-CimInstance -ClassName Win32_PhysicalMemoryArray |
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_PhysicalMemoryArray |
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_PhysicalMemoryArray
$cimClass.CimClassProperties |
Select-Object -Property Name, CimType, FlagsProperties
| Name | Type | Access | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Caption# | string | read | Short description of the object—a one-line string. 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 | ||||||||||||||||||||||||||||||||||||||||||||||||
| Depth# | real32 | read | Depth of the physical package—in inches. Unit: inches Code | ||||||||||||||||||||||||||||||||||||||||||||||||
| Description# | string | read | Description of the object. Code | ||||||||||||||||||||||||||||||||||||||||||||||||
| Height# | real32 | read | Height of the physical package—in inches. Unit: inches Code | ||||||||||||||||||||||||||||||||||||||||||||||||
| HotSwappable# | boolean | read | If TRUE, a physical package can be hot-swapped (if it is possible to replace the element with a physically different but equivalent one while the containing package has power applied to it, is "on"). For example, a disk drive package inserted using SCA connectors is removable and can be hot-swapped. All packages 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 | ||||||||||||||||||||||||||||||||||||||||||||||||
| Location# | uint16 | read | Physical location of the memory array. This value comes from the Location member of the Physical Memory Array structure in the SMBIOS information. Values (15)
Code | ||||||||||||||||||||||||||||||||||||||||||||||||
| Manufacturer# | string | read | Name of the organization responsible for producing the physical element. Code | ||||||||||||||||||||||||||||||||||||||||||||||||
| MaxCapacity# | uint32 | read | Use the MaxCapacityEx property instead. This value comes from the Maximum Capacity member of the Physical Memory Array 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: Maximum memory size (in bytes) installable for this particular memory array. If the size is unknown, the property is given a value of 0 (zero). Code | ||||||||||||||||||||||||||||||||||||||||||||||||
| MaxCapacityEx# | uint64 | read | Maximum memory size (in kilobytes) installable for this particular memory array. If the size is unknown, the property is given a value of 0 (zero). This value comes from the Extended Maximum Capacity member of the Physical Memory Array 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. Unit: kilobytes Code | ||||||||||||||||||||||||||||||||||||||||||||||||
| MemoryDevices# | uint16 | read | Number of physical slots or sockets available in this memory array. This value comes from the Number of Memory Devices member of the Physical Memory Array structure in the SMBIOS information. Code | ||||||||||||||||||||||||||||||||||||||||||||||||
| MemoryErrorCorrection# | uint16 | read | Type of error correction used by the memory array. This value comes from the Memory Error Correction member of the Physical Memory Array structure in the SMBIOS information. Values (8)
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, the property can be overridden to be a key property. Code | ||||||||||||||||||||||||||||||||||||||||||||||||
| OtherIdentifyingInfo# | string | read | Additional data, beyond asset tag information, that could be used to identify a physical element. One example is bar code data associated with an element that also has an asset tag. Note that if only bar code data is available and is unique or able to be used as an element key, this property would be NULL and the bar code data 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. Code | ||||||||||||||||||||||||||||||||||||||||||||||||
| PoweredOn# | boolean | read | If TRUE, the physical element is powered on. Code | ||||||||||||||||||||||||||||||||||||||||||||||||
| Removable# | boolean | read | If TRUE, a physical package 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 package can still be removable if power must be "off" to perform the removal. If power can be "on" and the package removed, then the element is removable and can be hot-swapped. For example, an extra battery in a laptop is removable, as is a disk drive package inserted using SCA connectors. However, the latter can be hot-swapped. A laptop's display is not removable, nor is a nonredundant power supply. Removing these components would affect the function of the overall packaging or is impossible due to the tight integration of the package. 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. Another example is a power supply package mounted on sliding rails. All removable packages are inherently replaceable. Code | ||||||||||||||||||||||||||||||||||||||||||||||||
| SerialNumber# | string | read | Manufacturer-allocated number used to identify the physical element. Code | ||||||||||||||||||||||||||||||||||||||||||||||||
| SKU# | string | read | Stockkeeping unit number for the physical element. 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. Values include the following: Values (12)
Code | ||||||||||||||||||||||||||||||||||||||||||||||||
| Tag# key | string | read | Unique identifier of the physical memory array. Example: "Physical Memory Array 1" Code | ||||||||||||||||||||||||||||||||||||||||||||||||
| Use# | uint16 | read | How memory is used in the computer system. This value comes from the Use member of the Physical Memory Array structure in the SMBIOS information. Values (8)
Code | ||||||||||||||||||||||||||||||||||||||||||||||||
| Version# | string | read | Version of the physical element. Code | ||||||||||||||||||||||||||||||||||||||||||||||||
| Weight# | real32 | read | Weight of the physical package in pounds. Unit: pounds Code | ||||||||||||||||||||||||||||||||||||||||||||||||
| Width# | real32 | read | Width of the physical package in inches. Unit: inches Code |
Remarks
The Win32_PhysicalMemoryArray class is derived from CIM_PhysicalPackage.
Inheritance
Superclass chain
- CIM_ManagedSystemElement
- CIM_PhysicalElement
- CIM_PhysicalPackage
- Win32_PhysicalMemoryArray
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("{FAF76B99-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.