K1000 Mass Deletion of Assets
I have a K1000 running v5.5.90548. I just switched my main asset inventory from MS Office Access to Kace. I have a list of hundreds of computer assets (listed by Dell Service Tag, which is a field in my Computer Asset) that I need to delete from Kace Assets as I have disposed of these machines. How do I do it? I have been unable to find a mass delete function in Kace. I am a rookie to Kace assets within the last few months.
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
rockhead44
10 years ago
Here's what I do. I created a custom ticket rule by going to Service Desk--> Configuration--> Queues
I created a rule that runs once per week and deletes any computer assets with no associated machine Inventory
My query is:
SELECT ASSET.ID
FROM ASSET
LEFT JOIN MACHINE ON ASSET.MAPPED_ID=MACHINE.ID
WHERE
ASSET_TYPE_ID=5
and MACHINE.ID IS NULL
**NOTE*** Yours may be different; You'll want to test and verify the ASSET_TYPE_ID from your database
Then, I run the following Update Query:
DELETE FROM ASSET WHERE (ASSET.ID in (<TICKET_IDS>))
and then get an e-mail that shows me what was deleted
Works beautifully for me and solved a huge problem. Good luck.
Comments:
-
I am new to SQL as well, so any idea what my query statement would be if I have a CSV list of the assets I need to delete? How do I match up the assets on the external CSV list with the corresponding assets in Kace? - H2OFan 10 years ago
-
How did you generate that .csv? The query I have produces a list of machines without a corresponding machine inventory. In other words, they no longer exist in my environment. That's what you want to produce.
As for SQL, download MySQL Workbench and tinker in that against your database. That will give you some practice and you can verify your ASSET_TYPE_ID number of your computer assets. Test the query I included here first and modify the number if needed. - rockhead44 10 years ago-
I generated the CSV by scanning the service tags of a pile of computers. We do not associate our machine inventory to our assets, so I cannot use your query. I work in a school district where we constantly reimage/rename computers. We found that when we had the machine inventory associated with the assets, kace kept creating duplicate assets, so we had to break the association. Each summer, we retire a few models of computers, and I have hundreds of machines to delete from the assets. Of course we never delete all of a given model, so I cannot use the model as the query factor either. I just have a pile of machines. I will try the MySQL Workbench. Thanks for the suggestion. Is there any way to pull that CSV list into Kace and then use it in the query statement? - H2OFan 10 years ago
-
I can't seem to reply to your last message so I'll write here. I also work for a school district and ran into the same issue you describe with imaging and then having duplicate assets. I have a report that gives me a listing of duplicate serial number sin Inventory. Unfortunately, I have to manually delete the old ones. However, once that is done, my custom ticket rule takes care of the orphaned Assets automatically.
You can certainly perform an import of the .csv file but my query won't do anything for you since you don't have the association between Inventory/Assets. How did you break that association? - rockhead44 10 years ago-
In the Asset Type Detail, for our Computer asset, we set the Mapped Inventory Field to None. - H2OFan 10 years ago