SCCM WQL Query: Finding Machines with 4GB RAM or More

If you need to identify machines with 4GB of RAM or more, this WQL query does it using ConfigMgr’s hardware inventory data. The Query select distinct SMS_R_System.Name, SMS_R_System.ADSiteName, SMS_G_System_X86_PC_MEMORY.TotalPhysicalMemory, SMS_R_System.IPAddresses, SMS_R_System.LastLogonUserName, SMS_R_System.DistinguishedName from SMS_R_System inner join SMS_G_System_X86_PC_MEMORY on SMS_G_System_X86_PC_MEMORY.ResourceId = SMS_R_System.ResourceId where SMS_G_System_X86_PC_MEMORY.TotalPhysicalMemory >= 4194304 TotalPhysicalMemory is reported in KB, so 4194304 KB is the […]

SCCM Wql Query For Machines With 4gb Ram Or More
If you need to identify machines with 4GB of RAM or more, this WQL query does it using ConfigMgr’s hardware inventory data.

The Query

select distinct SMS_R_System.Name, SMS_R_System.ADSiteName, SMS_G_System_X86_PC_MEMORY.TotalPhysicalMemory, SMS_R_System.IPAddresses, SMS_R_System.LastLogonUserName, SMS_R_System.DistinguishedName from SMS_R_System inner join SMS_G_System_X86_PC_MEMORY on SMS_G_System_X86_PC_MEMORY.ResourceId = SMS_R_System.ResourceId where SMS_G_System_X86_PC_MEMORY.TotalPhysicalMemory >= 4194304
TotalPhysicalMemory is reported in KB, so 4194304 KB is the 4GB threshold (adjust this figure for a different cutoff — for example 8388608 for 8GB).

Using It

Paste this into a new query or a collection’s Query Rule the same way as any other WQL-based rule. As with any hardware inventory query, results depend on the client having reported hardware inventory recently, and the reported figure is total installed physical memory rather than what’s currently available/free.

Common Reasons to Run This

Memory-threshold queries like this one come up most often when planning an OS upgrade or a new application rollout with a minimum RAM requirement — building a collection of machines that already meet the bar lets you scope a deployment ring without manually checking specs machine by machine. It’s equally useful in reverse: flip the operator to < instead of >= to find machines that don’t meet a requirement, which is often the more actionable list when you’re planning hardware refreshes or RAM upgrades ahead of a rollout.

A Note on the Class Name

The SMS_G_System_X86_PC_MEMORY class name is a historical artefact from 32-bit (“x86”) systems and still applies on 64-bit hardware inventory today — it’s simply the class ConfigMgr has always inventoried physical memory under, regardless of the actual processor architecture of the machine being reported on, so there’s no need to look for an “x64” equivalent.

Resources

🛠️

Gear We Recommend

Testing configs is easier with a dedicated admin machine set up right. Here’s the kit we use.

Browse our Windows Admin Toolkit picks on Amazon

As an Amazon Associate, TechyGeeksHome earns from qualifying purchases.


Discover more from TechyGeeksHome

Subscribe to get the latest posts sent to your email.

Andrew Armstrong

Andrew Armstrong is a UK-based IT professional with 26+ years of hands-on experience in Windows, Windows Server, SCCM/ConfigMgr, Active Directory, PowerShell, and enterprise infrastructure.

He founded TechyGeeksHome in 2010 and has published over 1,500 practical guides covering real-world IT problems and solutions. When not solving IT problems,

Andrew develops free Windows utilities including Ultimate Settings Panel, which has been downloaded over 850,000 times.

One thought on “SCCM WQL Query: Finding Machines with 4GB RAM or More

Comments are closed.