Tuesday, March 18, 2014

Howto: Create a device collection based on manufacturer in SCCM 2012

In this blog we'll discuss how to create a device collection in SCCM based on a device manufacturer.
This can be usefull when targeting hardware specific applications for instance.

First off, we'll need to get the manufacturer as it is noted in WMI. In our example, we used an ASUS.

The command you can run in the command prompt is:

wmic computersystem get manufacturer

 As you can see the return value is : ASUSTek COMPUTER INC.
 Next, we'll create a new device collection in the SCCM Console.
 Give it an appropriate name and optionally comment it. Choose 'All Systems' as the limiting collection. Click Next.
 Choose for 'Add Rule' and click on 'Query Rule'.
 Give the query a recognizable name, and click on 'Edit Query Statement...'
 Go to the Criteria tab, and click on 'Show Query Language'.
 Paste in the following code:

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.Manufacturer = "ASUSTeK COMPUTER INC."

Notice the last line, where the manufacturer comes in.

Click Next and finish the wizard.
Then rightclick the collection and choose 'Update Membership'. 
After refreshing the console, you'll notice that it's populated with ASUS devices.
















1 comment: