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.
thx alot
Hi Sir,
May i know how to delete the n numbers of objects in SCCM which does not exists in AD ?
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.
Thanks! this helped out alot, but R.Client = null didn’t work for me.
Instead I used R.Client != 1