SCCM Створюємо колекцію ПК з Windows 7 без SP1

В рамках інвентаризації ОС на ПК в нашій компанії, виникла необхідність створити колекцію SCCM, яка б включала всі ПК, виключаючи ПК з Windows 7 SP1. На першому етапі створимо колекцію комп'ютерів, яка б включала всі комп'ютери з Windows 7, незалежно від встановленого Service Pack-а.

Ось приклад простого запиту для колекції "All Windows 7 computers":
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.Caption like «% Windows 7%»

Запит на створення колекції з комп'ютерами Windows 7 без SP1 ( "Windows 7 computers without SP1") Буде трохи складніше, також область дії даного запиту необхідно обмежити раніше створеної колекцією" All Windows 7 computers ", тобто нам доведеться реалізувати вкладений запит:
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.Name not in (select distinct SMS_G_System_COMPUTER_SYSTEM.Name from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.Caption like «% Windows 7%» and SMS_G_System_OPERATING_SYSTEM.CSDVersion = «Service Pack 1»)