I have an Asset import for Windows devices. In some cases, the key changes from the source, but the name of the asset (label) is the same. The result is a duplicate asset.
Ex:
| Import Key(unique) | ServerName(label) | |
| 001 | Server1 | |
| 002 | Server1 | |
Although the source only has one record for server1, the import sees the object as new since the key is different, I end up having two objects for the same server in Assets.
I've tried setting attribute: ServerName as unique. This causes the import to throw an error and keeps a stale record in Assets.
I'm in the process of testing if setting the Object type mapping for Missing objects to Remove.
Is there a way to use Azure Automation to search an object type for duplicate attributes and delete all but the most recent object?