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
TheSMS_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 AmazonAs an Amazon Associate, TechyGeeksHome earns from qualifying purchases.
Discover more from TechyGeeksHome
Subscribe to get the latest posts sent to your email.
The script is working fine