How to create a query based on Direct membership is described here:
How to configure ConfigMgr collections to Active Directory containers is described here:
- Creating dynamic collections in ConfigMgr
- Configure dynamic collections in ConfigMgr
- Query ConfigMgr collections with Active Directory
In this blog I will describe how to create a new collection with Query rule.
First create a new collection in ConfigMgr and choose Membership rules based on Query rule. Click the [yellow database icon] and choose the query explained below. Choose "Dynamically add new resources" when using ConfigMgr R3 to automatically add new devices.
In this case I'm using a Resource class based on System Resource and "Edit Query Statement" for creating a new Query rule.
Select the Criteria tab and the [yellow star icon] for that. Click "Select" afterwards.
In this case I'm using a Attribute class based on System Resource and a Attribute based on "Operating System Name and Version".
When choose OK in the screen before (Select Attribute) the above screen will be displayed. Choose [Operator: Is Like] and Value based on Operating System variable here.
When choose OK in the screen before (Criterion Properties) the above screen will be displayed. Click OK afterwards.
The new collection with Query rule is ready now. All Windows 7 systems (in my case) will be automatically added in this new collection.
For new Windows releases use the following queries:
- Windows Vista: Value = %Workstation 6.0%
- Windows 7: Value = %Workstation 6.1%
- Windows 8: Value = %Workstation 6.2%
- Windows Server 2008: Value = %Server 6.0%
- Windows Server 2008 R2: Value = %Server 6.1%
- Windows Server 8: Value = %Server 6.2%
That way it's possible to create new collections with support on new Operating Systems. I will add support for new Operating Systems later when available.
Collections use WQL, not SQL - so the title of the article is wrong.
ReplyDeleteYou're right! I changed that in the blogpost already, but not in the title.
ReplyDeleteThanks for mentioning!
Great article!!
ReplyDeleteThanks, still valid in SCCM 2012 R2 ;)
DeleteDitto!
ReplyDeleteThanks.
Thanks Great post
ReplyDeleteMy pleasure! ;)
DeleteWhat about Windows 7 SP1 machines
ReplyDeleteYou can still using %Workstation 6.1% for that!
DeleteWhat if we want only Windows 7 SP1 workstations but we also have non-SP1 workstations on the network? The reasonI ask is because the recent patch issued by Microsoft to protect against the recent ransomware attacks requires Windows 7 SP1 or higher.
DeleteWhere can i get a query to view all the different OS versions of a specific collection?
ReplyDeleteNice Blog Post !
ReplyDelete