With the release of Windows Server 2022 I was deploying a new server into a Microsoft Endpoint Configuration Manager lab that I have for certain scenarios and one of the tasks I wanted to do was create a Device Collection within my MECM lab for that Windows Server and any future ones. Please note you need to be running at least version 2107 of MECM to have support for Windows Server 2022. I thought I would document the process for others and my own future reference.
Within your MECM Console navigate to Assets and Compliance > Device Collections and right click to Create a new Device Collection.
When the Wizard opens give the collection a name and any relevant comment for future reference. For my needs I select “All Systems” as the limiting collection but specify the collection that would make sense for you.
The next step is to setup define a membership rule, I am going to use a Query Rule to specify which servers belong in this collection. Give the query an appropriate name and then select “Edit Query Statement”.
When the next dialog box appears click on “Show Query Language”
Pasted in 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_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.Version = “10.0.20348”
This query will look for any system within your environment with the Operation System Version 10.0.20348 (aka Windows Server 2022) and include them in the query.
You can find this Operating System Version number in a number of ways, the way I prefer is to run systeminfo on the server in question and take a note of the version number returned:
And then click OK and OK again.
You should now be back with the Create Device Collection Wizard, ensure you configure the schedule for updating the collection to what makes sense for your organization.
Finish walking through the wizard to complete the creation of it.
Now when you look within Device Collections you should see your new query and hopefully, you’ll see populated with servers that are running Windows Server 2022.