I suggest working backwards. next time (or now), in the database (I assume we are talking about the CM database), check in CM for that duplicate record, and look at the properties of each record. Specifically, the Discovery information. It's possible that a stale/old record is being 'rediscovered' and kept alive in the database. Once you know what discovery is doing that, you may be able to figure out the "why". (Maybe not, but this is where I would start)
How to handle duplicate computer records in database
Hi,
I'm experiencing issues with duplicate computer records.
Whenever we need to rebuild a computer, an external script deletes the old record. However, sometimes the script can't move the computer object because there are two objects in the database with the same name.
Any ideas on how to handle this?
Microsoft Configuration Manager
1 additional answer
Sort by: Most helpful
-
Garth Jones 1,666 Reputation points MVP
2024-01-05T12:33:59.0566667+00:00 To add to Sherry's comment, It is nto supported to directly delete object via SQL, Instead you must use the ConfigMgr console or PowerShell or WMI to do it.
Next your script should also handle it when there are two devices with the same name. It are not dups per se, as the ResourceID will be different.