Tag Archives: duplicated objects

Find All Duplicated Computer Objects in SCCM Database…

SCCM_Logo

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:

Code:

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.