While I’m on the subject of SCCM queries, I would like to post another simple statement that I used to gather machines with less than 2 GB of total physical memory:
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.TotalPhysicalMemory <= 1572864
“Why did he use 1572864?” you ask? “Did he just pound his forehead onto his number pad?” you ponder?
We have a lot of machines that are running on a 32-bit OS. Therefore, Windows will not properly report the actual total physical memory that is installed. Therefore, rather than include a bunch of machines that have 2 GB RAM installed but are reporting, say, 1.75 GB, I chose to query for 1.5 GB (1572864 Bytes, as that is the required measurement).
As always, if you have a better way, I’d love to hear it! Let me know in a comment below!