/build/static/layout/Breadcrumb_cap_w.png

Deleting unlinked device assets?

Is there any way to find and delete assets that are not linked to a device anymore? I know that I can visually identify them by whether they have a bracketed device name next to the entry. But Kace was not well maintained over the  years and we have hundreds of orphaned records that I want to remove and clean up, so manual identification is not really optimal.


0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: Hobbsy 2 years ago
Red Belt
0

Top Answer

There is no quick way to do this unfortunately, due mainly to the fact that you cannot create labels in the Asset Management space, so you cannot sort device assets into groups and also due to the fact that the data fields you need are not available via the search options


Running the following SQL in a report will show you the extent of the issue

SELECT ASSET.ID,

       ASSET.NAME

  FROM ASSET ASSET

 WHERE (ASSET.ASSET_TYPE_ID = 5) AND (ASSET.MAPPED_ID = 0)

ORDER BY ASSET.ID, ASSET.NAME


Comments:
  • Thanks for this! I had to clean up some syntax but I got it working. From here I can output to a CSV and then convert the names to a regex string. Then search assets with names matching the regex, and delete in bulk.

    SELECT ASSET.ID,
    ASSET.NAME,
    ASSET.ASSET_TYPE_ID,
    ASSET.MAPPED_ID
    FROM ASSET
    WHERE (ASSET.ASSET_TYPE_ID = 5) AND (ASSET.MAPPED_ID IS NULL)
    ORDER BY ASSET.ID, ASSET.NAME - jlfrank 2 years ago
  • OK, I feel silly now but I found an easier approach, and it seems to be more accurate too.

    There is a built in report called "Computer Assets Mapped to Computers" that will output all asset mappings to devices. You can use this one, or if you want to exclude archived assets you can create a duplicate and add the archive status to the filters. Export the report as a CSV, and then filter on the Device column for "0 items". Now you can convert this column to regex and search your assets for deletion. - jlfrank 2 years ago
    • That’s great, just checking you know how to set up the device asset type to avoid the mess again? - Hobbsy 2 years ago
      • Yeah, I've got it linked on serialnumber instead of hostname now. I just needed to clean out all the legacy garbage. - jlfrank 2 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ