Find All Duplicated Computer Objects in SCCM Database…


Here is the query that will find all duplicated computer objects in your database. Really useful when OSD is involved! Example of that we are trying to get rid of:

Now, in order to identify the duplicates we need to create a new collection with following query:


select R.ResourceID,R.ResourceType,R.Name,R.SMSUniqueIdentifier,R.ResourceDomainORWorkgroup,R.Client from SMS_R_System as r full join SMS_R_System as s1 on s1.ResourceId = r.ResourceId full join SMS_R_System as s2 on s2.Name = s1.Name where s1.Name = s2.Name and s1.ResourceId != s2.ResourceId and R.Client = null

Once done you can click on the collection itself and safely select “Delete Special” to remove all duplicates!

If you guys have any questions please leave a comment down below.

4 thoughts on “Find All Duplicated Computer Objects in SCCM Database…

  1. Thushara

    thanks for above query. but I have two questions.

    1.when we check our system by using the given script, we have found that both the records are having client= yes. and some are client=0.

    2. this collection showing both records (healthy one and duplicated record). so the deletion will remove healthy record as well.

    can you please explain how we extend the above script to address these issues.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.