Device collections can be configured to dynamically populate based on a query of managed endpoints within a limiting collection. One of the many criteria that can be queried is an endpoint's operating system. For example, to create a collection for Windows 7 endpoints:
The limiting collection sets the scope of PCs for SCCM to search.
Navigate to ‘Membership Rules’ --> Add Rule --> Query Rule.
Select ‘Edit Query Statement’.
Select 'Show Query Language' and paste in the following:
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, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.Build from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "%Workstation%" and SMS_R_System.Build like "6.1.%"
Select ‘Show Query Design’.
Select the Criteria tab to verify the query is correct.
Click OK, then complete the wizard.
Important - When creating a collection, do not check the "Use incremental updates for this collection" box. Collections will update regularly, and can also be manually updated by right-clicking and selecting "Update Membership".
The newly created collection will soon populate with Windows 7 endpoints. This can be confirmed by via the "Operating System" and "Build" columns header within the device collection view.
This collection can now be used to monitor the number of Windows 7 endpoints in your environment, and to deploy task sequences to upgrade these endpoints to Windows 10 if desired.
Note that the above query can be modified to meet other criteria. See the table at the bottom of this article for other common OS build numbers.
Queries can also be used to identify endpoints that meet specific criteria, and return attributes that are not included in the standard collection view. EPS has provided a query for identifying Windows 7 endpoints that can be run against a collection, under "\Monitoring\Overview\Queries\Windows 7 Check".
This query may also be copied and modified to include additional criteria, and/or return additional attributes, via "Edit Query Statement" in the query's properties. Attributes can be edited under the "General" tab, and criteria under "Criteria".
Query results can be selected and copied into an external application such as Excel, but are intended to provide a quick in-console summation of results. See this article for more information.
Reports can be run on-demand or subscribed to on a schedule. They are a useful means of obtaining data external to the SCCM console. Report data may be exported to the following formats:
Two reports that can be used to identify endpoints by Operating System within a collection, under "\Monitoring\Overview\Reporting\Reports\Useful Reports, are":
Count devices in collection by OS version: Provides a tally of endpoints by discovered OS major and minor versions. Each may be drilled down into to provide more detailed information about the endpoints themselves.
Devices with a specific OS version by collection: Provides information on endpoints that match a specified OS version within a designated collection. For example, to identify endpoints with Windows 7, enter "6.1.%" into the "version (% as a wildcard)" field. Other Operating System version numbers can be found in the table at the end of this article. Note that as build numbers share commonalities across Operating Systems (Server, Embedded, etc), the resultant report may need to be filtered to achieve desirable results.
Reports may be run from within the console, or via website. To subscribe to a report from the SCCM Console:
Right-click the desired report and select "Create subscription".
Select a delivery method from the "Report delivered by:" drop-down.
Fill in the required fields, and any additional fields as desired.
Select whether to include a link to the report, and/or the report itself from the respective check-boxes.
Select the desired report format from the "Render Format:" drop-down.
Click "Next", and configure the schedule as desired.
Click "Next", and configure the report criteria as prompted.
Complete the wizard.
Active subscriptions can be managed under "\Monitoring\Overview\Reporting\Subscriptions".
The values in the second column of this table can be substituted into the "Build" and "Version" fields of the Device Collection and Query examples, respectively, to return endpoints with the OS of the first column.