Exchangemaster GmbH company logo

Exchangemaster GmbH - A Swiss IT Consultancy
Services
References
Partners
Contact
Getting Started
FAQs
Presentations
Articles
Community
Search
Popular
Tell-a-Friend
Follow Me

Follow exchangemaster on Twitter

Who's Online
We have 43 guests online
Syndicate
FAQ 000136 - How to get server memory info via PowerShell PDF Print E-mail
User Rating: / 5
PoorBest 
Written by Dejan Foro   
Apr 20, 2015 at 03:24 AM

 

When planning for server memory upgrades, you usually need to get the following information

- avialable slots,

- if those are filled or not and

-if filled what is the capacity of the module in it. 

 

There is a simple way to collect this info via PowerShell. You can use the following command:

 

 

Get-WmiObject -Class CIM_PhysicalMemory | Select-object DeviceLocator,Capacity | Format-Table -AutoSize


DeviceLocator      Capacity
-------------      --------
Board 1, DIMM 1A 8589934592
Board 1, DIMM 8A 8589934592
Board 2, DIMM 1A 8589934592
Board 2, DIMM 8A 8589934592
Board 3, DIMM 1A 8589934592
Board 3, DIMM 8A 8589934592
Board 4, DIMM 1A 8589934592
Board 4, DIMM 8A 8589934592
Board 5, DIMM 1A 8589934592
Board 5, DIMM 8A 8589934592
Board 6, DIMM 1A 8589934592
Board 6, DIMM 8A 8589934592
Board 7, DIMM 1A 8589934592
Board 7, DIMM 8A 8589934592
Board 8, DIMM 1A 8589934592
Board 8, DIMM 8A 8589934592

 

The command produces the result in bytes which is not user friendly so we can add some custom formating at the end which will produce a result in GB

 

Get-WmiObject -query "Select * from CIM_PhysicalMemory" | format-table DeviceLocator,@{n="Memory in GB";e={$_.Capacity /1GB}} -AutoSize

DeviceLocator    Memory in GB
-------------    ------------
Board 1, DIMM 1A            8
Board 1, DIMM 8A            8
Board 2, DIMM 1A            8
Board 2, DIMM 8A            8
Board 3, DIMM 1A            8
Board 3, DIMM 8A            8
Board 4, DIMM 1A            8
Board 4, DIMM 8A            8
Board 5, DIMM 1A            8
Board 5, DIMM 8A            8
Board 6, DIMM 1A            8
Board 6, DIMM 8A            8
Board 7, DIMM 1A            8
Board 7, DIMM 8A            8
Board 8, DIMM 1A            8
Board 8, DIMM 8A            8

 

 

<Previous   Next>