by Grzegorz Kulikowski

I had to get some info about host memory dimms layout, so i wrote this one.
It is utilizing CIM_PhysicalMemory. Not sure if i haven’t written it before, but i couldn’t find it on my disk so…
Here it is.

[sourcecode language=”powershell”]
Function Get-ESXiMemoryDimms {
Returns memory dimms configuration for esxi

This function utilizes wsman / cim in order to download configuration of memory dims in ESXi.

Specify esxi host for which you want to get the report

Password for user root inside esxi

PS C:\> Get-ESXiMemoryDimms -Esxi ‘Esxi048.domain.local’ -rootpw ‘password.123’ | ft *
BankLabel Manufacturer Description SizeGB MemoryType MemoryDef
——— ———— ———– —— ———- ———
P0_Node0_Channel0_Dimm0 Samsung P1-DIMMA1 16 24 DDR3
P0_Node0_Channel0_Dimm1 Samsung P1-DIMMA2 16 24 DDR3
P0_Node0_Channel1_Dimm0 Samsung P1-DIMMB1 16 24 DDR3
P0_Node0_Channel1_Dimm1 Samsung P1-DIMMB2 16 24 DDR3
P0_Node0_Channel2_Dimm0 Samsung P1-DIMMC1 16 24 DDR3
P1_Node1_Channel2_Dimm0 Samsung P2-DIMMG1 16 24 DDR3
P1_Node1_Channel2_Dimm1 Samsung P2-DIMMG2 16 24 DDR3
P1_Node1_Channel3_Dimm0 Samsung P2-DIMMH1 16 24 DDR3
P1_Node1_Channel3_Dimm1 Samsung P2-DIMMH2 16 24 DDR3
Winbond …625 11 Flash

NAME: Get-ESXiMemoryDimms

AUTHOR: Grzegorz Kulikowski

NOT WORKING ? #powercli @



#MemoryTypes from:
$MemHash = @{
‘3’=’Synchronous DRAM’;
‘4’=’Cache DRAM’;
’22’=’DDR2 FB-DIMM’;
’23’=’DDR2 FB-DIMM’;
$pwd = ConvertTo-SecureString $rootpw -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential (“root”, $pwd)
$CIMOpt = New-CimSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck -Encoding Utf8 –UseSsl
$Session = New-CimSession -Authentication Basic -Credential $cred -ComputerName $esxi -port 443 -SessionOption $CIMOpt
Get-CimInstance -CimSession $Session CIM_PhysicalMemory | select BankLabel, Manufacturer, Description , @{n=’SizeGB’;e={$_.Capacity/1GB}}, MemoryType, @{n=’MemoryDef’;e={$MemHash[$_.MemoryType]}}

You may also like

Leave a Reply

Chinese (Simplified)EnglishFrenchGermanHindiPolishSpanish