SCCM Mobile Device Collection Queries

Prajwal Desai
Posted by Prajwal Desai

In this short post I will be listing out SCCM Mobile Device Collection Queries. If you come across some new queries for mobile devices then do mention in the comments section.

I have also published another post on creating device collection for windows 10 computers. You can read more about that post here.

Query in SCCM – In SCCM, you can create and run queries to locate objects that match your query criteria. Queries can return most types of Configuration Manager objects, which include sites, collections, applications, and inventory data.

When you install Configuration Manager, it comes with set of built-in queries. Open the Configuration Manager console and go to Monitoring > Overview > Queries.

Listed below are the built-in queries.

All Systems with Specified Software Product Name and Version	
All Active Directory Security Groups	
All Client Systems
All Company Owned Devices
All jailbroken or rooted devices
All Mobile Devices
All Non-Client Systems
All Personal Devices
All Systems
All Systems with Hardware Inventory Collected
All Systems with Specified Software File Name and File Size
All Unknown Computers
All User Groups
All Users
ConfigMgr clients not upgraded to Configuration Manager 2012 R2 or later
Systems by Last Logged On User
This Site and its Subsites

When you create queries they get stored in SCCM site database. When you install Configuration Manager, you get some built-in queries. However if your requirement is something specific, you must create a new query.

When a query is run, Configuration Manager searches the site database for objects that match the query criteria. The results of the query appear in the results pane of the Configuration Manager console.

SCCM Mobile Device Collection Queries

You can use the below queries while creating a SCCM collection.

Collection Query for Android devices

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_DEVICE_COMPUTERSYSTEM on SMS_G_System_DEVICE_COMPUTERSYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_DEVICE_COMPUTERSYSTEM.DeviceModel like "Android%"

Device Collection Query for iPhones

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_DEVICE_COMPUTERSYSTEM on SMS_G_System_DEVICE_COMPUTERSYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_DEVICE_COMPUTERSYSTEM.DeviceModel like "%iphone%"

Device Collection Query for iPads

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_DEVICE_COMPUTERSYSTEM on SMS_G_System_DEVICE_COMPUTERSYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_DEVICE_COMPUTERSYSTEM.DeviceModel like "%ipad%"

Query for Windows Phone 8 devices

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_DEVICE_OSINFORMATION on SMS_G_System_DEVICE_OSINFORMATION.ResourceID = SMS_R_System.ResourceId where SMS_G_System_DEVICE_OSINFORMATION.Platform like "Windows Phone" and SMS_G_System_DEVICE_OSINFORMATION.Version like "8.0%"

Windows Phone 8.1 devices 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_DEVICE_OSINFORMATION on SMS_G_System_DEVICE_OSINFORMATION.ResourceID = SMS_R_System.ResourceId where SMS_G_System_DEVICE_OSINFORMATION.Platform like "Windows Phone" and SMS_G_System_DEVICE_OSINFORMATION.Version like "8.1%"

Windows Phone RT devices 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_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Model like "Surface%"
Share This Article
Prajwal Desai
Posted by Prajwal Desai
Follow:
Prajwal Desai is a Microsoft MVP in Intune and SCCM. He writes articles on SCCM, Intune, Windows 365, Windows Server, Windows 11, WordPress and other topics, with the goal of providing people with useful information.
3 Comments