The Query
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_SERVICE on SMS_G_System_SERVICE.ResourceId = SMS_R_System.ResourceId where SMS_G_System_SERVICE.Name like "MSExchange%"
Using It
- Create a new Device Collection under Assets and Compliance > Device Collections.
- Add a Query Rule membership rule, switch to the Query Language tab, and paste the query above.
- Save and let the collection populate on its next refresh cycle.
MSExchange-prefixed services.
A Note on What You’ll Actually Catch Today
Exchange Server 2019 was the last traditionally-versioned on-premises release — Microsoft skipped straight from there to Exchange Server Subscription Edition (SE), which reached general availability in July 2025 and now receives regular cumulative/security updates on an ongoing subscription-style servicing model rather than a numbered version cycle. Exchange 2016 and 2019 both reached end of support in October 2025, which means SE is now the only supported on-premises option — any collection built from this query today should realistically be turning up SE servers (upgraded in-place from 2019) rather than 2016/2019 boxes still on the old, now-unsupported versions. It’s also worth remembering this collection only ever sees on-premises Exchange servers reporting into your ConfigMgr hierarchy — it has no visibility into Exchange Online at all, since hybrid or cloud-only mailboxes aren’t ConfigMgr-managed devices. If you’re auditing a hybrid environment, use this collection for the on-prem estate and pair it with Exchange Online’s own admin reporting (orGet-ExchangeServer / the Hybrid Configuration wizard’s health checks) for the cloud side, rather than expecting one query to cover both.
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.
Did something change? How does this query works, since the SMS_G_System_SERVICE.Name looks for the Service Name (MSExchange%) not the Display Name (at least in CM1809)?
Did something change? How does this query works, since the SMS_G_System_SERVICE.Name looks for the Service Name (MSExchange%) not the Display Name (at least in CM1809)?