07-20-2022 12:54 PM - last edited on 04-02-2024 11:50 AM by Mercedes_O
Hi there,
We have Lansweeper up and running and have about 5000 assets. We need to import an asset tag to a custom field within the assets. I can get a list of Serial to asset tag and would like to know if there is a way to mass import this?
I can see topics asking similar questions from years ago stating there is no way to do this, but it might be implemented in the future.
Is there now a way to do this? If not, how are others getting asset tag information into Lansweeper? Is there a way to do it via SQL?
Thanks
Graham
Solved! Go to Solution.
07-22-2022 01:19 PM
Hello there!
Unfortunately, our asset import functionality can indeed only be used to import new assets into the Lansweeper database, it can't be used to update assets that are already in the Lansweeper database. This feature was added to our customer wish list. We aren't able to guarantee that this feature will be implemented or provide you with an estimated release date at this time.
Manually adding the asset tags to the assets would indeed be the preferred option, although this task can be cumbersome if the change affects many assets.
Theoretically, you could also accomplish this with a custom database script, but we don't provide support for this. If your Lansweeper installation is broken due to a custom database script, you would need to perform a restore of your Lansweeper installation.
Below is a high-level example of how you might go about this with a custom database script. Lansweeper has a built-in asset property called Barcode. If you didn't enter other information into it for any asset, you could use this field to store your asset tags. Then your database script could look something like this:
UPDATE tblAssetCustom Set BarCode='12345678' WHERE tblAssetCustom.Serialnumber = 'ABCDEFG' GO UPDATE tblAssetCustom Set BarCode='12345679' WHERE tblAssetCustom.Serialnumber = 'ABCDEFH' GO
The above script would set the Barcode property based on the serial number of the asset. You can use other properties of course in your where clause. The above script updates two assets, but you can expand the query as much as you like. If you are already using the Barcode property for something else, you could also use one of the custom fields as described here: https://www.lansweeper.com/knowledgebase/configuring-and-adding-data-to-asset-custom-fields/
07-28-2022 07:59 PM
We also have a lot of assets, (around 250,000), we created a custom powershell script that allows me to update every field on every asset except for Asset Name. If you don't have someone at your organization that knows how to write scripts like this, here are 2 other options. Not ideal but options nonetheless...
07-22-2022 01:19 PM
Hello there!
Unfortunately, our asset import functionality can indeed only be used to import new assets into the Lansweeper database, it can't be used to update assets that are already in the Lansweeper database. This feature was added to our customer wish list. We aren't able to guarantee that this feature will be implemented or provide you with an estimated release date at this time.
Manually adding the asset tags to the assets would indeed be the preferred option, although this task can be cumbersome if the change affects many assets.
Theoretically, you could also accomplish this with a custom database script, but we don't provide support for this. If your Lansweeper installation is broken due to a custom database script, you would need to perform a restore of your Lansweeper installation.
Below is a high-level example of how you might go about this with a custom database script. Lansweeper has a built-in asset property called Barcode. If you didn't enter other information into it for any asset, you could use this field to store your asset tags. Then your database script could look something like this:
UPDATE tblAssetCustom Set BarCode='12345678' WHERE tblAssetCustom.Serialnumber = 'ABCDEFG' GO UPDATE tblAssetCustom Set BarCode='12345679' WHERE tblAssetCustom.Serialnumber = 'ABCDEFH' GO
The above script would set the Barcode property based on the serial number of the asset. You can use other properties of course in your where clause. The above script updates two assets, but you can expand the query as much as you like. If you are already using the Barcode property for something else, you could also use one of the custom fields as described here: https://www.lansweeper.com/knowledgebase/configuring-and-adding-data-to-asset-custom-fields/
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now