Subscribe via RSS Feed Connect on LinkedIn

16GB RAM in HP NL40 Microserver and using PowerShell to check system RAM at startup

20/01/2013 6 Comments


I have a couple of the HP NL40 Microservers in my lab, they are little low powered servers (dual core AMD 1.5Ghz) but make quite decent little virtualisation hosts for a lab environment. Officially they support 8GB RAM, but there are a number of reports of them working with 16GB. In fact a good UK supplier ships them with 16GB, using this ECC kit

The servers will also take non ECC kits (about half the price), but unfortunately on boot the servers only register 16GB of usable RAM about 1/3 or 1/5 boots in my experience (even with the various modified bios FYI). If they boot registering only 8GB they work quite happily,  but with only 8GB addressable, if they boot with 16GB all appears to work fine too (had them running for more than a week consistently with Hyper-V VM’s using all the RAM), that being said, this isn’t supported, your mileage may vary etc..

For reference I’m using Patriot G2 Series PC3-10600 Main Memory 16 GB 1,333 MHz 240-Pin 2x 8 GB DDR3-RAM Kit (PGD316G1333ELK) and G.Skill 16GB (2x 8GB) Dual Channel Ares Series Memory Kit (DDR3 1333, 9-9-9-24, 1.5v, Intel XMP Extreme Memory Profile Ready) (F3-1333C9D-16GAO).

So, I have a server that can work with 16GB, but I can only tell if I’m in front of it watching POST when it boots, that’s not much use as I often start the servers remotely/run them headless. Fortunately a little PowerShell comes to the rescue.


When booted with 8GB we get this

Get-WmiObject -Class Win32_ComputerSystem




But with 16GB:



So, I can run a script to check the amount of RAM and reboot if it’s not 16GB, but I’ll want a get out, in case it decides it’s jut not registering 16GB anymore and I get stuck in an endless loop

# If mem is 16GB it reports 17179009024
# If mem is 8GB it reports 8589074432

$mem = Get-WmiObject -Class Win32_ComputerSystem
If ($mem.TotalPhysicalMemory -lt 8589074433)
Write-Host “Memory is only 8GB”
If ($mem.TotalPhysicalMemory -gt 8589074433)
Write-Host “Memory is over 8GB”



So, if the server reports less than 16GB it will reboot and try again.

Let’s create some files in the c:\Check-Memory folder to simulate more than 100 unsuccessful boots, here is a little loop to create the files




We run the script


Nothing happens as there are more than 100 files in the C:\Check-Memory folder

If we delete some of the c:\Check-Memory files, to bring it below 100


The script runs fine, since I’m running booted on 16GB, the server isn’t rebooted and the log files are deleted out of C:\Check-Memory.


So, now when I boot my servers remotely or via WOL, it will check the memory and reboot itself until the memory registered is 16GB, unless it loops 100 times then it gives up.

Useful? Please take a second to shareTweet about this on TwitterShare on LinkedInShare on Google+Email this to someone
Tom Arbuthnot

Tom Arbuthnot

Principal Solutions Architect at Modality Systems
Tom Arbuthnot is Principal Solutions Architect at Unified Communications specialist Modality Systems. He is a Microsoft Certified Master and MVP, blogger, regular on The UC Architects Podcast, and speaker at events including Microsoft Lync Conference, TechEd and Ignite. He co-runs The Microsoft UC User Group London.
Tom Arbuthnot
Filed in: vendor • Tags: , , ,

Comments (6)

Trackback URL | Comments RSS Feed

  1. Anders says:

    Cool script, to bad I’m running vmware and not Hyper-V and just noticed the same issue (my vmware cluster is never rebooted but just did and both my servers N40 and N54 showed up with 8G :( bummer

  2. Andrew says:

    Great script! thanks!

  3. Jon Rippon says:

    Hi Tom,

    This is just what I was looking for! I have modified it as my HP Microserver is running ESXi as a OS.

    I`m just having a bit of trouble setting it up to not to loop if it reboot 100 times. Which part of the script checks for a log file as i cant see it?


    • hi Jon,

      I’m not sure how you would do this in ESXi, I’m relying on Windows to run the PowerShell script. I suspect you could use PowerCLI, but you need something to run it from

Leave a Reply