How Lansweeper uniquely identifies assets

When a network asset is being scanned, Lansweeper needs to determine whether the asset is already present in the Lansweeper database. It does this by comparing some specific data pulled from the asset being scanned with data already present in the database. This point of comparison is called the "unique key" or "internal ID" of the asset. It's what Lansweeper uses to uniquely identify the asset.

If the unique key of the asset being scanned matches the unique key of an asset already present in the database, the existing asset page is updated with information pulled from the asset being scanned. If the unique key of the asset being scanned does not match any unique key already present in the database, a new asset page is generated for the asset being scanned. (Windows computers are an exception to this rule if rename detection is enabled, but more on that later on in this article.)

You can see an asset's unique key listed when hitting the Edit Asset button on the left side of the asset's Lansweeper webpage. Keys are stored in the AssetUnique field of the tblAssets database table, though you need to assign an alias to the field to view its data in a report. If no alias is assigned, the report builder automatically converts AssetUnique to an asset name or MAC address.

Depending on the asset's asset type, the unique key is formed differently.

  • The unique key of a Windows computer is:
    <NetBIOS domain or workgroup name>\<NetBIOS computer name>\1
    unique key of Windows asset
    As a Windows computer's name and domain are used as part of its ID, name or domain/workgroup changes of Windows computers can cause new assets to be generated. You can prevent this behavior by enabling rename detection, more information on which can be found in this knowledge base article. In recent Lansweeper releases, this setting is enabled by default. Rename detection uses a computer's MAC address/model/serial number combination to determine whether the machine is already present in the database. It updates the computer's existing webpage if a name or domain change occurs, changing the machine's ID to:
    <new domain name>\<new computer name>\1
  • When a Windows computer is scanned, Lansweeper automatically creates monitor assets for the monitors attached to the computer. The unique key of a monitor asset generated by Lansweeper is:
    Mon:<3-letter monitor manufacturer code>:<monitor serial>
    unique key of monitor asset
    Within the monitor's unique key, the monitor manufacturer is referenced with a 3-letter code. A list of 3-letter codes and the monitor manufacturers they belong to can be found in this knowledge base article.
  • The unique key of other, non-Windows assets is:
    <MAC address> (if found)
    <IP address>\1 (if a MAC address is not found)
    <device ID or UUID> (in some cases for mobile devices if a MAC address is not found)
    <randomly generated string> (if the asset is manually created without a MAC or IP)
    unique key of non-Windows asset with MAC address
    unique key of non-Windows asset without MAC address
    unique key of non-Windows asset without MAC address or IP address
    As a non-Windows device's name is never used as part of its unique key, name changes of non-Windows devices never cause new assets to be generated.
    If a non-Windows device has multiple MAC addresses, Lansweeper picks one MAC as the unique key. All MAC addresses are expected to be unique however. Devices that share a MAC are considered to be one and the same and may be merged into a single asset.

Related Articles