Creating a operating system-based collection query rule for Windows 10 in SCCM 2012

This is just a quick post on creating a operating system-based collection query rule for Windows 10 in SCCM 2012. In preparation for the release of Windows 10, I have been working on an OSD task sequence that applies the Windows 10 Enterprise Insider Preview and creating collections in SCCM. There are a number of different ways to construct an operating system-based collection, but one method works more quickly than an alternative.

As you know, the System Center Configuration Manager client reports back details of the workstation or server environment to the SCCM management point, including information about the operating system. This information can be used to populate device collections through WQL queries of information in the SCCM database. But similar, if not equivalent, information is collected through different processes by the client, resulting in the SCCM primary site server potentially having incomplete details of a device. This is particularly evident when looking for details about a workstation computer shortly after it has completed an OSD task sequence.

After a Hardware Inventory cycle is run, SCCM will have access to the Operating System.Caption value, which will be, for the Windows 10 Insider Preview, “Microsoft Windows 10 Enterprise Insider Preview”. This query can be made more general by using the LIKE operator and then wrapping the search term in percent symbols: %Windows 10 Enterprise%.

But, if you want to be able to add computers to a collection before a Hardware Inventory cycle is run, you can use System Resource.Operating System Name and Version, which will be, for the Windows 10 Insider Preview, “Microsoft Windows NT Workstation 10.0”. This can be made more general by using LIKE operator and wrapping the search term in percent symbols: %Windows NT Workstation 10%.

The Query Statement that I am using to populate my collection of Windows 10 workstations 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 where SMS_R_System.OperatingSystemNameandVersion like "%Microsoft Windows NT Workstation 10%"

This SMS_R_System.OperatingSystemNameandVersion query is useful because it is able to locate computers in SCCM within a few minutes after they have been reimaged, before the client has run a Hardware Inventory cycle. My hunch is that the operating system name and version are being sent to the management point as part of a Heartbeat Discovery that happens soon after the computer finishes the OSD task sequence. I’ll check the logs to confirm this.

5 thoughts on “Creating a operating system-based collection query rule for Windows 10 in SCCM 2012

  1. Matteo

    I need to create an operating system-based collection query rule for Windows 10 mobile to collect devices with Windows 10 mobile enterprise.
    May you help me?
    Thanks

  2. Witchdoc

    Hi there;

    This seems to be working fine for me as you have written it so I thank you very much. However, I’d like to be able to find all computers with Windows 7 on them but changing “%Microsoft Windows NT Workstation 10%” to “%Microsoft Windows NT Workstation 7%” doesn’t seem to be working.

    How can I fix this?
    Thanks for a great article.

  3. Nasri Naeem

    @Witchdoc. The operating system value for Windows 7 is “Microsoft Windows NT Workstation 6.1”.
    I hope it helps as the post is quite old.
    Thanks

  4. Thomas

    Please improve your website design. Your query is running out of the box and is covered by an ad that cannot be removed. The only way to copy it is to view the source which just shows lazy web page design on your part. Other than it being annoying to use this site what you wrote is good.

Comments are closed.