In this short post we will see the steps to create SCCM device collection for windows 10 computers. A query is a specific set of instructions that extract information about a defined set of objects.
You can create queries and store them in the Configuration Manager site database. By running a query, you search the database for information about the objects that match the query criteria.
Configuration Manager comes with just a handful of queries out-of-the-box that illustrates a small part of the rich amount of data available. Microsoft has picked 10240 as the final build number of Windows 10.
Surprisingly when Windows 10 RTM was launched the build number was 10240 and it wasn’t changed even after the Windows 10 final version was released. In my previous post, I have shown the steps to install System Center Configuration Manager Technical Preview 4. If you look at the TP updates, a lot of capabilities are added in very release and most of the focus is on managing Windows 10 computers.
Create SCCM Device Collection for Windows 10 Computers
To create windows 10 computers device collection, launch the Configuration Manage console, click Assets and Compliance, right click Device Collection and click Create Device Collection.
Specify Name of the collection, to set the limiting collection, click on Browse and choose the limiting collection. Click Next.
Membership Rules – Click on Add Rule > Query Rule.
In the Query Rule Properties window, provide a name to the query, click on Edit Query Statement.
Next, in the Query Statement Properties window, click on star icon to specify a criteria.
Set the Criterion type as Simple value. Choose the attribute class = Operating System, attribute = build number. Choose the operator as equal to and set the value to 10240 which is the build number of Windows 10 OS. Click OK.
If you need the query, here it is.
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_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.BuildNumber = "10240"
Click on Next.
The device collection has been created. Wait for few minutes and you will see all the Windows 10 computers grouped into the collection.
Hello Prajwal
After following the information in this article I have found that I am not getting accurate results or perhaps I am not being patient enough. I created 2 Device Collections based on Build Numbers “19042” and “19044”, Windows 10 20H2 and 21H2 respectively. I then ran the HW and SW Inventory and Updated the Device Collection. I can confirm that at least 1 workstation in the 20H2 Collection is indeed 21H2. Any thoughts as to why?
Jason
Running HW and SW Inventory and Patience seems to have been the answer. The trouble I am trying to resolve is why some of my Workstations upgraded/updated to 21H2 while others only went to 20H2 with the same Deployment Group.
Hi Prajwal,
I accidentally deleted a device collection, is there a way to restore it?
Do you back ConfigMgr setup regularly?
Hi.
Thank you I have use your training several times
David
Glad to hear that.
Hi Prajwal
In device collection query, how do i add “AND” “OR” statement. to find from different AD container.
System_Resource.System_OU is equal to *******
or
System_Resource.System_OU is equal to ********
Or
System_Resource.System_OU is equal to ********
Hello Prajwal,
Thanks for sharing this. When I created collection with this steps it is adding Servers as well in collection.
Refine your query.
1909 query, this one is right OR wrong please tell me sir
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_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.Version = “10.0.18363” and SMS_R_System.Name like “KGIDT%”
Hi Prajwal,
Thank you for all your articles. This one works great for creating collections based on the main build number, but i need to be able to differentiate between the different sub builds. When i try to build a collection based on 18363 it works, but if i try to use 18363.720 it will not return anything. The information is listed “somewhere” because i can see the full build number if viewing a collection adding the column for Operating System Build (10.0.18363.720). Ive also tried using that full build number without result. Could you point me in the right direction?
Thank you!
sir
can share the detail what is collection and different type of collection how its created
That would be too basic but Yes I will cover it when I get time
please let me about this
This will list all of the windows 10 devices. Doest matter which verson.
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.OperatingSystemNameandVersion like “%Workstation 10.0%”
helpful, but this query also returns server 2019 machines. need to add a producttype check. 1 = workstations, 2 = domain controllers, 3 = member servers
I find that the query you showed us on here leaves too many Windows 10 PCs not joining a device collection. For example, I created a query for 1809 using yours and only about 2/3 of my PCs will join the DC. Why, I have NO idea. My guess is that SCCM is not getting the information that the query is wanting. Instead I use the following query and have had 100% success using it. It can be adjusted to detect other builds of Windows 10 by altering the Build Number to match what you want SCCM to find.
select MS_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.Build = “10.0.17763”
You can add OR queries for each build number in your tree which will allow you to search for all respective Builds. My Query is:
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_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where
SMS_G_System_OPERATING_SYSTEM.BuildNumber = “17763” or SMS_G_System_OPERATING_SYSTEM.BuildNumber = “15063” or SMS_G_System_OPERATING_SYSTEM.BuildNumber = “16299” or SMS_G_System_OPERATING_SYSTEM.BuildNumber = “17134”
I have many versions of windows Retail, Business and Consumer how do I build the query for them.
how do i give my colleagues permission to the sccm environment as helpdesk users, also to the network administrator of the company:
helpdesk user: function helpdesk = { “remote to client computers”,
“OSD”, “deploy applications”, “audit workstations”}
network administrator: function netadmin = { “remote to client computers”,
“OSD”, “deploy applications”, “application management”,
“software center”, “create app packages”
}
but this will include server 2016 machines also?
No, just windows 10 machines.
If you hit the value button in the criteria menu, it will display a list of build numbers
That’s correct.
Was hoping that maybe you could update this or point me to where I can create a Device Collection for Windows 10 2016 ( 1607 ) Enterprise LTSB?
Use the caption to get it done instead of build number.
Does that query need to be amended for the November Update, now that the build number has changed to 10586? Or perhaps it would be a good idea to split the collections?
I guess yes, the query needs to be updated. Will update it soon. Thanks for notifying me about that.