This blog is owned and operated by the ANZ ConfigMgr Premier Field Engineer team.
Contributors
Ian BartlettMatt ShadboltGeorge Smpyrakis
Blog Links
One of the many tasks an SCCM admin faces is checking for ConfigMgr duplicate computer records. There are many ways that we can get duplicate records, but here are the three most common:
I normally see this in environments where VDI is common. Generally, a VDI admin has duplicated machines without giving each a unique MAC address. This is bad and should be avoided. If you’re VDI admin has created a bunch of computers with the same MAC, we need to delete them from SCCM. To find these objects, run the following TSQL query:
SELECT dbo.v_RA_System_MACAddresses.MAC_Addresses0, Count(dbo.v_R_System.Name0) AS SystemCount FROM dbo.v_R_System RIGHT OUTER JOIN dbo.v_RA_System_MACAddresses ON dbo.v_R_System.ResourceID = dbo.v_RA_System_MACAddresses.ResourceID GROUP BY dbo.v_RA_System_MACAddresses.MAC_Addresses0 ORDER BY SystemCount DESC
These are the most common duplicate objects. Most likely this occurs due to OSD or conflicting discovery cycles. We basically end up with two computer objects, with the same name/hardware/MAC but different SMSBIOSGUID. It causes much confusion for ConfigMgr because it often doesn’t know how to process the inventory for the phantom object. To find these objects, create an SCCM Query (or query based collection) with the following Query Statement:
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
One other way to look for dupes is to use the HardwareID. Use the following TSQL to find the objects with duplicate HardwareIDs:
SELECT Name0, Hardware_ID0, Count(Hardware_ID0) AS SystemCount FROM dbo.v_R_System GROUP BY Hardware_ID0, Name0 ORDER BY SystemCount DESC
Matt Shadbolt