The Model/Manufacturer-Based Approach
The most reliable way to build this collection today is still matching on the hardware inventoryModel and Manufacturer fields rather than any single dedicated “is this a VM” flag:
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.Model in ("Virtual Machine", "VMware Virtual Platform", "VirtualBox")
Older/Fallback Approach
If some clients aren’t reporting a clean Model string, you can catch most hypervisors by matching on the Manufacturer field instead (VMware, Microsoft Corporation for Hyper-V, or Xen), though this is less precise and worth spot-checking against known VMs in your environment before relying on it. As with any hardware inventory query, results depend on hardware inventory having actually run recently on each client — a machine that hasn’t reported inventory in a while may be missing from the collection even if it’s genuinely virtual.What About a Dedicated “Is Virtual Machine” Flag? (Updated for 2026)
Configuration Manager’s database does technically expose anIs_Virtual_Machine boolean column in v_R_System, sourced from the client’s own CCM_DesktopMachine.IsVirtual WMI property, so it’s tempting to build a collection query straight off that single field instead of matching Model/Manufacturer strings. In practice that’s not the recommended approach: the flag has long-documented reliability gaps, most notably missing VMware ESXi-hosted virtual machines in some environments, which means a collection built purely on Is_Virtual_Machine can silently under-report your virtual estate. The Model/Manufacturer WQL query above remains the more dependable, commonly recommended method for exactly this reason — treat any dedicated VM flag as a secondary cross-check rather than your primary source, and spot-check both against a handful of machines you know for certain are virtual.
Resources
Gear We Recommend
Running this in a home lab? Here’s the gear that keeps our test environment reliable.
Browse our Home Lab Essentials 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 query actually gets all non-VM machines. I changed it to be as follows,
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 where SMS_R_System.ResourceId in (select SMS_R_SYSTEM.ResourceID 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.Model like “%Virtual%”)
The query actually gets all non-VM machines. I changed it to be as follows,
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 where SMS_R_System.ResourceId in (select SMS_R_SYSTEM.ResourceID 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.Model like “%Virtual%”)