In this article I will show you how to create a device collection based on device name with wild card.
Today I needed to deploy google chrome only to desktop machines, to achieve this I created a device collection with a query to only include computers with the computer name WK* because in my company all desktop machines are names WK0009293 (For Example)
How To Create Collection Based On Device Name With Wildcard
To Create Device Collection Based On Device Name with Wildcard follow the below steps
- Open the Configuration manager console
- Browse to \Assets and Compliance\Overview\Device Collections
- Browse to the folder you wish to create the device collection
- Right click and select create device collection
- Give the collection a name and select the limiting collection (Below I have selected All Windows 10 machines as I only want windows 10 machines in this collection)
- Click Next
- Select add rule then click query rule
- Give the query a name (Below I have given Machines Starting With WK)
- Click on edit Query Statement
- Click on the criteria tab
- Click on the sun icon
- Click Select under criterion properties
- In Attribute class select “system resource” then in attribute select “NetBIOS Name”
- Click on OK to close the Select attribute box
- In the operator box select “is like” then in the value box enter your device name using the % character as a wildcard
- In the example above I want to select all the machines that are names WT%%%%%%% for example WT0009293 (If you need help with this step please post a comment below and I will help you out)
- Click OK to close the Criterion Properties window
- Click OK to close the query statement properties window
- Click OK to close the query rule properties window
- Click next
- Click next
- Click Close
- Now right click on the device collection you just created and select update membership
- For my device collection you can see there are 2373 members
- Always check the members by right clicking on the device collection and select show members. Make sure the devices in the device collection are the one you expect to see. Note that only 1000 devices are shown, if you want to view all machines you need to click on the yellow box