Import a list of Computer to a collection

Today I’ll show you 2 ways to add a list of PC into a collection. As you know the best way is to use a query to query the PC information. But what if you have a variety PCs name and they don’t have any common things?

Ok, we have 2 ways to add a list of PC to a collection. First one, you can use the “Import User device” (please see my post here). For this way, you should know the PC name, UDI and MAC address and sometime this make us feel so uncomfortable. For example, what if you need to add 500PC to a collection ? I guess you can’t find and add one by one UID and Mac address for each PCs. That’s why we have a another way to do it.

In this post, I’ll combine query and excel to process the data.

Now open your Excel which contain the PC list and prepare your file like this.

Why do we use ” ? Because it’s a character that SCCM will used to recognized and distinguished PCs.

In the Result column, we add a formulas, to copy column, A, B, C and put the result in column D.

What I put in the column D (Result) is =CONCATENATE(A2,B2,C2)

Now we have

Then we copy to create the new string for all PCs

Now we have a list of 300 (or 500) PCs.

The next steps is we prepare the query script.

Go to the SCCM Console >> Device Collections >> select Create Device Collection

Enter the Name (of the collection) and limiting collection. You can specify any name and select the default collection (like All system device). In this case, I’ve created a collection to filter for x86 client for my upgrading, so I choose it.

Click Next

Now click “Add Rule” >>

Select Query Rule

Name it as you want then click Edit Query Statement 

On “Query Statement Properties” >> click Show Query Language 

Now we edit the query script a little bit like below

Select * from SMS_R_System where SMS_R_System.Name is in ()

Now we copy all the PC from the excel file and put into the ()

Click OK three times to close the collection creation.

On the collection that we have just created, we can see there’s 9 members in the group. Duple-click on this collection to see detail client inside.

You can modify it to add more and more PCs.

Right-click on the collection >> Properties

Go to Membership Rules tab >> click on Edit

>> Edit Query Statement >> Show Query Language >>

We copy the full list of pc and put them into the blank.

I’ve just added 300 PCs in the list

>> click OK 3 times.

>> Click Refresh button    on the top-right- corner.

We have around 299 PCs in the collection now.

So, I’ve finished show you how to add a multi PC into a collection. If you have any concerns don’t hesitate contact me at


MVP Thai Diep (