Tuesday, December 29, 2009

SCCM 2007 R2 - Create Dynamic collections based on AD Security Groups

The SQL syntax for creating Dynamic collection based on AD Security Groups is 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 from SMS_R_System where SMS_R_System.SystemGroupName ="DOMAIN\\SECURITYGROUP"



DOMAIN is the name of your AD Domain, SECURITYGROUP is the name of the AD Security group.
It takes time this query to be refreshed and the list to be populated with all Computers Accounts.